i have these loop:
what event, of usercontrol, i can implante these type of loop?Code:do
'something......
'.....................
doevents
loop
thanks
Printable View
i have these loop:
what event, of usercontrol, i can implante these type of loop?Code:do
'something......
'.....................
doevents
loop
thanks
That depends entirely on the purpose of the loop.
What is it, or will it, be doing?
heres the entire loop:
these loop can activate 3 events: joystick, move and notmove.Code:Do
If (blnActivateMoveNotMoveEvents = False And blnJoystickActivate = False) Then tmrNewEvents.Enabled = False
If blnActivateMoveNotMoveEvents = True Then
If (lngOldPosX < Extender.Left And lngOldPosY < Extender.Top) Then
DirDirection = DirectionLeftUp
ElseIf (lngOldPosX < Extender.Left And lngOldPosY > Extender.Top) Then
DirDirection = DirectionLeftDown
ElseIf (lngOldPosX > Extender.Left And lngOldPosY < Extender.Top) Then
DirDirection = DirectionRightUp
ElseIf (lngOldPosX > Extender.Left And lngOldPosY > Extender.Top) Then
DirDirection = DirectionRightDown
ElseIf (lngOldPosX < Extender.Left) Then
DirDirection = DirectionLeft
ElseIf (lngOldPosX > Extender.Left) Then
DirDirection = DirectionRight
ElseIf (lngOldPosY < Extender.Top) Then
DirDirection = DirectionUp
ElseIf (lngOldPosX > Extender.Top) Then
DirDirection = DirectionLeftDown
End If
If Extender.Left <> lngOldPosX Or Extender.Top <> lngOldPosY Then
lngOldPosX = Extender.Left
lngOldPosY = Extender.Top
RaiseEvent Move(lngOldPosX, lngOldPosY, DirDirection)
Else
RaiseEvent NotMove(lngOldPosX, lngOldPosY, DirDirection)
End If
End If
If blnJoystickActivate = True Then
Call PollJoystick
If (MYJOYEX.dwXpos = 0 And MYJOYEX.dwYpos = 0) Then
Direction = DirectionLeftUp
ElseIf (MYJOYEX.dwXpos = 0 And MYJOYEX.dwYpos = 65535) Then
Direction = DirectionLeftDown
ElseIf (MYJOYEX.dwXpos = 65535 And MYJOYEX.dwYpos = 0) Then
Direction = DirectionRightUp
ElseIf (MYJOYEX.dwXpos = 65535 And MYJOYEX.dwYpos = 65535) Then
Direction = DirectionRightDown
ElseIf (MYJOYEX.dwXpos = 0) Then
Direction = DirectionLeft
ElseIf (MYJOYEX.dwXpos = 65535) Then
Direction = DirectionRight
ElseIf (MYJOYEX.dwYpos = 0) Then
Direction = DirectionUp
ElseIf (MYJOYEX.dwYpos = 65535) Then
Direction = DirectionDown
ElseIf (MYJOYEX.dwXpos = 0 And MYJOYEX.dwYpos = 0) Then
Direction = DirectionNone
End If
RaiseEvent Joystick(JoyNum, Direction, lngButton)
End If
DoEvents
Loop
insted of timer i wanted use these loop, but i don't know what usercontrol event that i can put these loop.
in form i can put it in activate event and works, but here i don't know.
thanks