-
And again, I have a problem!
I need to know how to use a TabStrip.
How do I make something "Attached" to one of the tabs, and make them work.
And second, I want to know how can I print all the data in a listbox and a textbox.
It should be like this in the printed page:
<Text1.text>
<an item from List1>
<an item from List1>
<an item from List1>
<an item from List1>
<an item from List1>
and so on.
-
Add a TabStrip and use the (Custom) and then change the name and add a new tab with a name than click ok and then use a picture box and put what you want in it. Than set the visible properties when a new tab is clicked.
Code:
Private Sub TabStrip1_Click()
If (TabStrip1.SelectedItem.Index) = 1 Then Text1.Visible = True: Label1.Visible = False: Text1.text = "Tab 1 was clicked, Text1 is now visible, but Label1 is not visible."
If (TabStrip1.SelectedItem.Index) = 2 Then Text1.Visible = False: Label1.Visible = True: Label1.Caption = "Tab 2 was clicked, Text1 is not visible, but Label1 is now visible."
End Sub
And for your second question. Printing:
Code:
Printer.Print Text1.text
For i = 0 To List1.ListCount - 1
Printer.Print List1.List(i)
Next i
Printer.EndDoc