Click here to Skip to main content
Sign Up to vote bad
good
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:33
vlad781988


2 solutions

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  
Comments
vlad781 - 24 Feb '13 - 12:35
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!
  Permalink  
Comments
vlad781 - 24 Feb '13 - 2:55
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:24
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
Your Filters
Interested
Ignored
     
0 OriginalGriff 385
1 Sergey Alexandrovich Kryukov 348
2 Arun Vasu 345
3 Tadit Dash 228
4 Aarti Meswania 195
0 Sergey Alexandrovich Kryukov 9,955
1 OriginalGriff 7,589
2 CPallini 4,028
3 Rohan Leuva 3,422
4 Maciej Los 2,949


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid