Form in a Control drawing

  • Thread starter Thread starter Falk Winkler
  • Start date Start date
F

Falk Winkler

how i can drawing a Windows Form in a Panel, not on the Dektop.
I will using a Form as Desktop.
 
If you're asking how to display a Form as a child of a Panel, then set the
Form's "TopLevel" property to False, then add it to the controls collection
of the Panel, and then call Show() on it.

Form2 f = new Form2();
f.TopLevel = false;
this.panel1.Controls.Add(f);
f.Show();
 
thanks you,

who runs,
as can I thank form in the panel scalieren, e.g. the panel am a Desktop
with a size of 1024x768
 
I'm not sure that I understand what you're asking here... If you're just
trying to host a Form instance in a Panel, then the code that I posted
should work. But the Panel will need to be inside another Form.
Alternatively, you could visually design a UserControl, to be the same as
the Form contents, and then embed an instance of this UserControl in the
Panel instead of the Form.
 
Back
Top