What is major difference between form and usercontrol?

  • Thread starter Thread starter Buddhist.CHinA
  • Start date Start date
B

Buddhist.CHinA

Both of them are derived from Container Control Class.
But if I used a user control derived class, it cause a refreshment
problem, whereas everything was okay if used a form derived class.
I suspected user control had blocked some messages.


thx.
 
Hi,

Forms are meant to be top level windows where user controls are controls -
child windows. Form also can be set to be child controls, but then they lose
some of the top-level functionality. For example top level windows can have
main menu where child windows cannot. Of course this might not be a problem
if one uses the new menu strips that comes with .NET2.0.
There are certain messages that windows sends only to top-level windows.
These messages are handled and processed by the form class. User controls on
the other hands doesn't have the code to process them.

As far as it goes fro refreshing the control/form I don't think there should
be a diference.
 
Back
Top