Problem with user control in combination with tabcontrol

Raddict

Active member
Joined
May 19, 2005
Messages
28
Location
Rotterdam (Holland)
Programming Experience
3-5
I'm struggling with a weird kind of problem.
When I insert my UserControl on the form it works fine. But if I try to put it on a tab in a tabcontrol, or in a frame the usercontrol dissapeares after I ran the program.
If I try to put the same control back in my project it gets a new name (relaisswitch2 instead of relaisswitch1). When I try to rename I get a message that that control already exists :confused:

Can someone tell me what is going on? And how to correct it?
Try putting the user control on the tab and run the program. It gives two messages:
there is already a component relaisswitch1
the variable "relaisswitch1" is either undeclared or was never assigned
 

Attachments

Last edited by a moderator:
this is very strange indeed..
Try this;
- Drag RelaisSwitch1 onto the tabcontrol
- on form1_load proc put:
TabPage1.Controls.Add(RelaisSwitch1)

Hope that helps
 
Back
Top