SET VAR vcrlf = ((CHAR(13)) + (CHAR(10)))
DIALOG 'Press a Key' vres1 vk1 'no' OPTION +
|BUTTON_OK_CAPTION &OK +
|BUTTON_CANCEL_CAPTION &Cancel
SET VAR vlk0 = (LASTKEY(0))
SET VAR vlk1 = (LASTKEY(1))
SET VAR vmsg = ('vres1 ="' & .vres1 + '"' + .vcrlf)
SET VAR vmsg = (.vmsg + 'vk1 ="' & .vk1 + '"' + .vcrlf)
SET VAR vmsg = (.vmsg + 'LastKey(0) ="' & .vlk0 + '"' + .vcrlf)
SET VAR vmsg = (.vmsg + 'LastKey(1) ="' & .vlk1 + '"' + .vcrlf)
PAUSE 2 USING .vmsg
RETURN
----- Original Message -----
From: "Steve Breen" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, March 06, 2008 7:12 AM
Subject: [RBASE-L] - RE: DIALOG BOX CONTROL
Buddy
If you click the ok or cancel button on the dialog box does it set a variable
such as vkey or how do they function?
I understand the function of vkey and last key just not the dialog button
output or response
Steve
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Walker, Buddy
Sent: Wednesday, March 05, 2008 7:03 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: DIALOG BOX CONTROL
Steve
You can check the variable vkey
If vkey = '[esc]' or vinv# then
Whatever......
Endif
You could also check to see if vinv# is null
Buddy
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Breen
Sent: Wednesday, March 05, 2008 5:15 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - DIALOG BOX CONTROL
In 6.5 plus a dialog box did not have options such as ok and cancel. Now that
the do I am not sure how to control their input results in the code.
IE: using mouse to select the "cancel" option
Please offer any suggestions
Steve
-- get_inv_number.rmd
LABEL loop
CLEAR VAR vinv#
DIALOG 'Enter A Invoice Number or ESC to exit (CDIINV):' vinv#=10 vkey 1
IF (LASTKEY(0)) = '[esc]' THEN
GOTO finish
ENDIF
IF (LASTKEY(0)) = '[cancel]' THEN
GOTO finish
ENDIF
CLEAR VAR vpon
SET VAR vpon = pon FROM master WHERE cdiinv = .vinv#
IF vpon IS NULL THEN
RUN errmsg.rmd USING 'Invoice Number Not found'
GOTO loop
ENDIF
PRINT final_billing WHERE cdiinv = .vinv#
LABEL finish
RETURN
Stephen Breen
CDI Services, Inc.
Road Support Division
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================