Drawing Inside Windows Form

This is a discussion on Drawing Inside Windows Form within the C# Programming forums, part of the General Programming Boards category; Hi, I've started a new project, Im Building "Pong" in C#, for starters it will be for 2 players , ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    14

    Drawing Inside Windows Form

    Hi,

    I've started a new project,
    Im Building "Pong" in C#,

    for starters it will be for 2 players , after that's done i'll make a network multiplayer game out of it

    my first problem is - i dont know how to draw any thing inside Windows Forms...
    theres no Component (that i know of) who allow to draw stuff,

    if theres none - i need to use DX ? or can i use the .NET env to do that?

    Thanks,
    Roy

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    129
    Look up system.windows.drawing

    It's the best anyone can do, because there's a lot to read about, however, once you start to understand whats needed, you can easily google anything you don't understand
    He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

    The fool wonders, the wise man asks. - Benjamin Disraeli

    There are no foolish questions and no man becomes a fool until he has stopped asking questions. Charles Steinmetz

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    USA
    Posts
    22

    Smile

    Also you will want to become extremely familiar with GDI+ and possibly the Windows Presentation Foundation (WPF) classes which capitalize on XAML technology.

    In respect to gaming with the .Net Framework there are many resources including the XNA project that Microsoft hosts which addresses among other things: XBox 360 and P.C. game Programming from novice on thru to expert.

    Some other topics addressed at the XNA site include Direct X 3D and 2D game design.

    Lots of tools and examples with some also delivering source code as well as tutorials.
    Last edited by TheRaven; 04-30-2008 at 03:00 AM.

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    You can paint to most any control because a windows form has a method called "CreateGraphics()" which creates a GDI+ graphics context. You essentially use this to draw to the control. A graphics object has many Methods like [Fill|Draw][Rectangle|Ellipse]() drawing lines, and you can do buffered graphics as well. It's pretty basic, and you'd be be well off to use a higher level 2D/3D graphics API Like DirectX.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 11-15-2008, 06:11 PM
  2. Windows Form Sizing
    By deviousdexter in forum C# Programming
    Replies: 2
    Last Post: 10-21-2008, 06:26 PM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  4. drawing sprites with the windows gdi
    By lambs4 in forum Game Programming
    Replies: 10
    Last Post: 08-14-2003, 10:06 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21