Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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.
 
Share this answer
 
v2
Comments
vlad781 24-Feb-13 12:35pm    
Thank you, very informative and easy to understand.
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!
 
Share this answer
 
Comments
vlad781 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900