FarligOpptreden
Executive Member
- Joined
- Mar 5, 2007
- Messages
- 5,396
Pass the Label through to the doLoop function, instead of the Form.
Code:
Imports Test
Public Class frmGUI
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
testStuff.doLoop("value", Me.Label1)
End Sub
End Class
Code:
Public Class doStuff
Public Function doLoop(ByVal db As String, ByRef lbl as Label)
For i = 0 To 10
[B]lbl.Text = i[/B]
Next i
Return Nothing
End Function
End Class
Last edited: