I have been trying to design a custom tabcontrol in vb.net used a codeproject example to develop the said tabcontrol but the example is in C# I have converted all parts and theres only one error i cant seem to work around could you guys help?
C# Code Code:
void ColorTabControl_ControlAdded(object sender, ControlEventArgs e) { if (e.Control.GetType() == typeof(TabPage)) { e.Control.Font = new Font(e.Control.Font, e.Control.Font.Style & ~FontStyle.Bold); } }VB Code That I think it is... Code:
Private Sub ColorTab_ControlAdded(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles MyBase.ControlAdded ' ERROR: 'is' expected \/ If e.Control.GetType() = typeOf(Tabpage) Then e.Control.Font = New Font(e.Control.Font, e.Control.Font.Style & FontStyle.Bold) End If End Sub
Sorry if this is the wrong section since my result code will ve in vb thats why i posted it here.




Reply With Quote