User Control [modified]
-
Good day, How can I make a UserControl inherits from a Form? I've tried to do this:
public partial class UserControl1 : Form
{
..
}But when I add a the dll to my test program, I could not find UserControl1 from the listed control and a message appears indicating the no control exist. Thanks. -- modified at 5:09 Tuesday 27th February, 2007
-
Good day, How can I make a UserControl inherits from a Form? I've tried to do this:
public partial class UserControl1 : Form
{
..
}But when I add a the dll to my test program, I could not find UserControl1 from the listed control and a message appears indicating the no control exist. Thanks. -- modified at 5:09 Tuesday 27th February, 2007
-
If you want to use your UserControl1 as a UserControl, then you must inherits it from Class UserControl. You cannot create a new usercontrol inherits from a Form.
The reasoN why i want to create a usercontrol that is derived from a form because i want to create customable panel, that can be minimize or maximize. i've made a usercontrol which is derived from Panel but the problem is when the backcolor of the control is transparent and that control is placed inside my usercontrolpanel, the transparency goes through all the way to the form, that is why i thought i should derived my usercontrol from a form. Please refer to the image linke below for sample output of my usercontrol: http://www.geocities.com/fritzjeran/SAMPLEOUTPUT.JPG Any suggestion is appreciated. Thanks.
-
The reasoN why i want to create a usercontrol that is derived from a form because i want to create customable panel, that can be minimize or maximize. i've made a usercontrol which is derived from Panel but the problem is when the backcolor of the control is transparent and that control is placed inside my usercontrolpanel, the transparency goes through all the way to the form, that is why i thought i should derived my usercontrol from a form. Please refer to the image linke below for sample output of my usercontrol: http://www.geocities.com/fritzjeran/SAMPLEOUTPUT.JPG Any suggestion is appreciated. Thanks.
fjlv2005 wrote:
customable panel, that can be minimize or maximize
That's easy, you just set the dock style of the control to all, to maximise on the form. Set it to none and the size to 0,0 to minimise.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )