I have 3 user controls and i am inserting them into a Tab control in 3 different tabs. My issue here is that the button design and panel design is altered when i insert then user controls into the tab control. One example is the the butttons have sharp edges instead on round. What is causing this ?
this is my code for inserting the user controls into the tab control:
public void addUC(UserControl control, TabPage tab)
{
control.Parent = tab;
control.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
}
Designer.cs class:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.adresseListPanel);
this.Controls.Add(this.landComboBox);
this.Controls.Add(this.searchPanel);
this.Name = "CustomerMainControl";
this.Size = new System.Drawing.Size(1291, 568);
this.Load += new System.EventHandler(this.CustomerMainControl_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CustomerMainControl_KeyDown);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.adresseListPanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.adresseDataGrid)).EndInit();
this.searchPanel.ResumeLayout(false);
this.searchPanel.PerformLayout();
this.ResumeLayout(false);
can anyone help me with this ?
A relevant detail from your UI:
This is what a GUI looked like on old Windows versions, 2000 and before. Your app is running without Visual Styles enabled. Which will happen when your Main() method in Program.cs does not call Application.EnableVisualStyles(). The boilerplate code generated from the project template:
Hard to guess how that happened without any hints. If you have no idea how your app starts then press F11 to debug the startup code of your app.