halljd39
New member
- Joined
- Sep 7, 2006
- Messages
- 2
- Programming Experience
- 1-3
Hello --
I am working on a simple project but I can't seem to get past a part of a loop procedure. Thought I could pick the brains of others...
So far I have the following code which move the lable up, but the down code does not loop for some reason - it does move down, though.
------------up-----------------
------------------down---------------
****The lable does move down but does not loop and I can't figure out what is going on.... any help would be great!!
Thanks!!
I am working on a simple project but I can't seem to get past a part of a loop procedure. Thought I could pick the brains of others...
So far I have the following code which move the lable up, but the down code does not loop for some reason - it does move down, though.
------------up-----------------
VB.NET:
Private Sub tmrUp_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrUp.Tick
If lblVBnet.Top + lblVBnet.Height <= 0 Then
lblVBnet.Top = Me.Height
Else
lblVBnet.Top = lblVBnet.Top - lblVBnet.Height * 1 / 4
End If
End Sub
Private Sub btnUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUp.Click
tmrUp.Enabled = True
End Sub
VB.NET:
Private Sub tmrDown_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrDown.Tick
If lblVBnet.Top + lblVBnet.Height >= 0 Then
lblVBnet.Top = Me.Height
Else
lblVBnet.Top = lblVBnet.Top + lblVBnet.Height * 1 / 4
End If
End Sub
Private Sub btnStopDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStopDown.Click
tmrDown.Enabled = False
End Sub
Thanks!!
Last edited by a moderator: