Reputation: 1
I have a Form that contains many controls including TabControl
.
The problem occurs when I execute the program, the contents of the tabPage disappear.
The following are pictures of the Form before and after the Execute and the source code.
Source Code: http://www.mediafire.com/?8d19lx1h2wwgl3m
Upvotes: 0
Views: 335
Reputation: 17094
It is hard to say for sure as with 'Telerik.WinControls' resource I can't run the code.
That said it looks to be a problem with how you are loading the Main Form. I presume the issue being you can see the controls in the designer in visual studio, but not when the code is run. To resolve this remove the Main_Load
method and place its contents in the default Main
constructor like so in the Main.cs
file.
public Main()
{
InitializeComponent();
//Create Directory
sFunctions.CreateDirectory("Pictures");
ClassConnections conn = new ClassConnections();
conn.setConnection(
AppDomain.CurrentDomain.BaseDirectory + "\\Database\\",
"MasterFile.mdb",
"lib2006");
publicMainForm = this;
}
Then remove the line
this.Load += new System.EventHandler(this.Main_Load);
From the Main.Designer.cs
file
Upvotes: 2