': This program uses
': InForm - GUI library for QB64 - v1.2
': Fellippe Heitor, 2016-2020 - fellippe@qb64.org - [member=2]FellippeHeitor[/member]
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------
': Controls' IDs: ------------------------------------------------------------------
': External modules: ---------------------------------------------------------------
'$INCLUDE:'InForm\InForm.ui'
'$INCLUDE:'InForm\xp.uitheme'
'$INCLUDE:'IQTest.frm'
': Event procedures: ---------------------------------------------------------------
IF Control
(ProgressBar2
).Value
>= 10 THEN Control(ProgressBar1).Value = Control(ProgressBar1).Value + 10
Control(ProgressBar2).Value = 0
Control(ProgressBar2).Value = Control(ProgressBar2).Value + 1
IF Control
(ProgressBar1
).Value
>= 100 THEN Caption(STOPClickMeBT) = "TOO LATE!"
tStatus = False
Control
(STOPClickMeBT
).Left
= __UI_MouseLeft
+ (RND * 100) + 50 IF Control
(STOPClickMeBT
).Left
> Control
(IQTest
).
Width - Control
(STOPClickMeBT
).
Width THEN Control
(STOPClickMeBT
).Left
= 10 Control
(STOPClickMeBT
).Top
= __UI_MouseTop
+ (RND * 100) + 50 IF Control
(STOPClickMeBT
).Top
>= Control
(IQTest
).Height
- Control
(STOPClickMeBT
).Height
- 60 THEN Control
(STOPClickMeBT
).Top
= 10
tStatus = True
SUB __UI_BeforeUpdateDisplay
'This event occurs at approximately 30 frames per second.
'You can change the update frequency by calling SetFrameRate DesiredRate%
IF (__UI_MouseLeft
< (Control
(STOPClickMeBT
).Left
- 50)) OR (__UI_MouseLeft
> (Control
(STOPClickMeBT
).Left
+ Control
(STOPClickMeBT
).
Width + 50)) THEN IF (__UI_MouseTop
> (Control
(STOPClickMeBT
).Top
- 50)) OR (__UI_MouseTop
< (Control
(STOPClickMeBT
).Top
+ Control
(stopmeclickbt
).Height
+ 50)) THEN __UI_MouseEnter STOPClickMeBT 'MoveButton
'If you set __UI_UnloadSignal = False here you can
'cancel the user's request to close.
CASE ClickOnTheSTOPButtonBeforeTimeILB
' the user wins
Caption(STOPClickMeBT) = "You GOT IT"
tStatus = False
CASE ClickOnTheSTOPButtonBeforeTimeILB
CASE ClickOnTheSTOPButtonBeforeTimeILB
'This event occurs right before a control loses focus.
'To prevent a control from losing focus, set __UI_KeepFocus = True below.
CASE ClickOnTheSTOPButtonBeforeTimeILB
CASE ClickOnTheSTOPButtonBeforeTimeILB
'When this event is fired, __UI_KeyHit will contain the code of the key hit.
'You can change it and even cancel it by making it = 0