Quantcast
Channel: GSAK Forum
Viewing all articles
Browse latest Browse all 75069

timed message window by Kai Team - 2013-07-01

$
0
0
Another option would be to use a form (click here) with the DelayExit property. The form could display a message in a Memo element and a button to proceed that the user could click if they want to continue before the delay exit you've set. This is a bit more complicated than lignumaqua's suggestion, but gives you complete control over what the message looks like (size, position, background color, text size and color, etc), if that's important to you.

Edited to Add: Here's code for a basic form to get you started. Just run the code stand alone to see how it works. The form will disappear after 3 seconds (you can change the time) or immediately if you click the OK button. If you decide to go this route and you call the form repeatedly, put the form in a subroutine and then just update $Memo1 and call the subroutine wherever in your code you want to display a message. wink.gif

user posted image

GSK
$Memo1="This is a test message!"

WHILE TRUE
   $FormExit = form($Form1,"")
   BEGINCASE
       CASE $FormExit = "DelayExit"
       BREAK

       CASE $FormExit = "SystemExit"
       RETURN Msg="Macro Canceled"

       CASE $FormExit = "OK"
       BREAK
   ENDCASE
ENDWHILE

BEGINSUB Name=Run

ENDSUB

<Data> VarName=$form1
#********************************************************************
# Form generated by GSAK form designer on Mon 01-Jul-2013 18:29:55
#********************************************************************

Name = Form1
 Type = Form
 Caption = Message
 Delay = 3
 Height = 281
 Width = 500

Name = OK
 Type = Button
 Height = 25
 Left = 208
 Top = 198
 Width = 75
 Taborder = 8
 Caption = OK

Name = Memo1
 Type = Memo
 Height = 139
 Left = 41
 Top = 30
 Width = 409
 Taborder = 11

<enddata>

Viewing all articles
Browse latest Browse all 75069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>