gestione2
visualizzazione dati su varie righe utilizzando la combinazione
multilinee e vbCrLf per Label e TextBox
Private Sub CommandButton1_Click()
Dim a, b, c As Integer
Rem visualizza dati codificati in :label,in
textbox1,listbox1,combobox1
Rem su diverse linee con vbCrlf per interlinea e multilinee
a = 10
b = 20
c = a + b
Label1.Caption = Label1.Caption &
"a= " & a & vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
Label1.Caption = Label1.Caption & "a= " & a
& vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
Label1.Caption = Label1.Caption & "a= " & a
& vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
TextBox1.MultiLine = True
TextBox1.Text = TextBox1.Text &
"c=..." & c & vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
End Sub
vedi mostra5.ppt
visualizzazione usando vbCrLf e autosize
Private Sub CommandButton1_Click()
Dim a, b, c As Integer
Rem visualizza dati codificati in :label,in
textbox1,listbox1,combobox1
Rem su diverse linee con vbCrlf per interlinea e autosize per
label, senza multilinee
a = 10
b = 20
c = a + b
Label1.AutoSize = True
Label1.Caption = Label1.Caption &
"a= " & a & vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
Label1.Caption = Label1.Caption & "a= " & a
& vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
Label1.Caption = Label1.Caption & "a= " & a
& vbCrLf
Label1.Caption = Label1.Caption & "b= " & b
& vbCrLf
Label1.Caption = Label1.Caption & "c= " & c
& vbCrLf
TextBox1.Text = TextBox1.Text &
"c=..." & c & vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
TextBox1.Text = TextBox1.Text & "c=..." & c
& vbCrLf
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ListBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
ComboBox1.AddItem ("c=" & c)
End Sub
vedi mostra6.ppt