Hello,
VS 2005
This works but i am wondering is there a better way to do this. I will be having combo boxes, text boxes, buttons and list boxes and labels.
The layout of each tab will be the same. As the user click add task it will add a new tab the controls will be added and some controls will be bounded by tables in a database.
The user will then add some data into some of the text boxes and click save. The contents will be saved to the database.
My code is below and this is just a start. If anyone know of a better more efficient then I will be happy to learn from them.
Many thanks in advance,
Steve
VS 2005
This works but i am wondering is there a better way to do this. I will be having combo boxes, text boxes, buttons and list boxes and labels.
The layout of each tab will be the same. As the user click add task it will add a new tab the controls will be added and some controls will be bounded by tables in a database.
The user will then add some data into some of the text boxes and click save. The contents will be saved to the database.
My code is below and this is just a start. If anyone know of a better more efficient then I will be happy to learn from them.
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TabControl1.TabPages.Add("Index1", "Task 123")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim cboClients As New ComboBox
cboClients.Top = 30
cboClients.Left = 30
AddHandler cboClients.SelectionChangeCommitted, AddressOf ComboBox_selectionChangeCommitted
cboClients.Parent = Me.TabControl1.TabPages(1) 'Add the combo box the specified tab
End Sub
Private Sub ComboBox_selectionChangeCommitted(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Fill the combo box
End Sub
Many thanks in advance,
Steve