Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Visual-Studio , +
Hey guys, I just wanted to ask everyone on their opinion in which win form they think is best for a simple click-to-play game.
 
Its a 2-d game.
 
Should I use a 'Windows Form' or a 'User Control'?
What are the disadvantages and advantages of each?
 
Thank you.
Posted 23-Feb-13 20:33pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Form vs User Control:
- Form[^] is top level control used for program windows
- UserControl[^] is used to create other controls. We put this into Forms and other controls.
- both are derived from ContainerControl[^]
 
If you want to try develop “simple click-to-play 2-d game”, I recommend you to use WPF[^] instead of Windows Forms, although both are not designed for game development.
With WPF you can very easily achieve:
- styling of controls
- drawing on Canvas
- animations and transitions
 
XNA[^] is for game design.
  Permalink  
v2
Comments
vlad781 at 24-Feb-13 12:35pm
   
Thank you, very informative and easy to understand.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This isn't a question about what to use for a game, it's your homework question:
What are the disadvantages and advantages of a 'Windows Form' and a 'User Control'?
 
And we do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
 
Try it yourself, you may find it is not as difficult as you think!
  Permalink  
Comments
vlad781 at 24-Feb-13 2:55am
   
Its not my homework. I'm simply doing this as a hobby. I'm just trying to get some advice from a developers viewpoint.
OriginalGriff at 24-Feb-13 3:24am
   
Then ask a question which makes sense.
The two are not equivalent; you can't use a form instead of a user control and vice versa. You use user controls on forms.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,656
1 Sergey Alexandrovich Kryukov 6,400
2 CPallini 5,240
3 George Jonsson 3,584
4 Gihan Liyanage 2,625


Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 24 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100