Guidance
指路人
g.yi.org
Software / Reginald / Examples / dismiss.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/*
GUIBEGIN
WINDOW , 21, 89, 249, 38, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , Dismiss
	FONT 8, 400, MS Shell Dlg
	PUSH 4, 20, 40, 14, TABSTOP, , OkButton, , &Ok
	TIMER 5000
DEND
GUIEND
*/

/* This script presents a window containing a TIMER control set to time-out
 * at 5000 milliseconds (ie, 5 seconds). It also contains a PUSH control. If
 * the user hasn't clicked the button within that time-out, the window is
 * automatically destroyed (and this script ends).
 */

LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow('NORMAL')

again:
DO FOREVER

	guigetmsg()

	CATCH SYNTAX
		CONDITION('M')
		SIGNAL again
	CATCH HALT
	FINALLY
		guidestroywindow()
END
RETURN




/* Called by Reginald when a time-out happens for our window. */
wm_timer:
	/* Post a WM_CLOSE to simulate the user closing the window. */
	guisendmsg(, "POST CLOSE")

	/* Return nothing so that this time-out happens only once. */
	RETURN

/* Called by Reginald when our "OkButton" is clicked. */

wm_click_okbutton:
	/* Here we could kill the timer, by calling GuiRemoveCtl with
	 * no args. But note that closing the window automatically
	 * destroys the timer. If you wanted to instead GuiWake
	 * someone, you'd typically kill the timer first.
	 */
	guisendmsg(, "POST CLOSE")

	RETURN
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-3-19  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:45:19