I am using a Tab control in my windows form which contains two tabs.
I want to accomplish, where one tab is enabled the other is completely disabled (greyed out), so the user cannot even access/view the information in the other tab.
I have attempted the below in line 11
led = False
But by doing this the user can still click on the tabpage and see the information inside. While the page has been disabled from any further changes. I would like the actual tabpage header disabled as well, so that when the user attempts to click on the tabpage that is disabled, nothing will happen and the user will not be able to even see the contents of the tabpage that has been disabled.
Kindly provide assistance on how to accomplish this in VB.Net.
Private Sub btnCNVOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCNVOK.Click
Dim xFile As New XmlDocument()
Dim root = xFile.DocumentElement
If txtCNVChqVerf.Text = root.GetElementsByTagName("NextChqNum")(0).InnerText Then
frmMain.TabControl1.TabPages(0).Enabled = False
MsgBox("Cheque number incorrect." & vbNewLine & "Please try again.", MsgBoxStyle.Exclamation, "Cheque Validation")