I have added a tab control to the windows form application.......... I have 2 Tabs Added lets say tab1 and tab2 and control name is tabcontrol
I added One Textbox in tab1 and another textbox in tab2 .........I have a common SAVE Button at the bottom........
In One shot I want to print the values entered in textbox1 and textbox2 when SAVE Button is clicked .......
For this I declared 2 variables dim x as string, y as string at the top of the general declarations
I used SelectedIndex change of TabControl
Select case Tabcontrol_selectedIndexchanged
case 0 ie tab1 control clicked
if textbox1.text.trim <> "" then
x = textbox1.text.trim
case 1 'Tab1 control clicked
if textbox2.text.trim <> "" then
y = textbox2.text.trim
Private Sub BtnSave_Click()
I am not able to achieve the desired results properly