|
-
Jul 5th, 2008, 07:28 PM
#1
Thread Starter
PowerPoster
where i put these type of loop?
i have these loop:
Code:
do
'something......
'.....................
doevents
loop
what event, of usercontrol, i can implante these type of loop?
thanks
-
Jul 8th, 2008, 06:50 AM
#2
Re: where i put these type of loop?
That depends entirely on the purpose of the loop.
What is it, or will it, be doing?
-
Jul 10th, 2008, 04:15 PM
#3
Thread Starter
PowerPoster
Re: where i put these type of loop?
heres the entire loop:
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
these loop can activate 3 events: joystick, move and notmove.
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|