Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactive Messageboxes
Message
From
05/08/2000 22:59:19
 
 
To
05/08/2000 20:18:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00401589
Message ID:
00401613
Views:
20
Since the message form would be modal, and processing stops until it is released, a value can be returned in it's Unload() event. e.g.
** CallingForm.cmdAppend.Click()
LOCAL lcValue
DO FORM messageform TO lcValue
IF NOT EMPTY(lcValue) AND VARTYPE(lcValue)="C"
  ** got one
  thisform.txtTarget.Value = ALLTRIM(lcValue)
  ** do the append code
ELSE
  ** failed
  MessageBox("Hey, you didn't give me the right info!")
  ** and don't do the append
ENDIF

** messageform.cmdOK.Click()
** note: cRetVal is a custom property of the messageform
thisform.cRetVal = Alltrim(thisform.txtMessage.Value)
thisform.Release()

** messageform.cmdCancel.Click()
** set return value to empty so the calling form will 'fail'
thisform.cRetVal = ""
thisform.Release()

** messageform.Unload()
RETURN this.cRetVal
HTH
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform