Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input

Status
Not open for further replies.

RTorrance

Programmer
Apr 12, 2002
64
CA
I was just wondering if there was something like a VB inputbox in VFP. If so could you please let me know the syntax. ThankYou.
 
Yes, VFP 7.0 has an Inputbox() function:
INPUTBOX(cInputPrompt [, cDialogCaption] [, cDefaultValue] [, nTimeout])

In earlier versions, it was necessary to "roll-your-own". Check the UT ( I'm sure there is more than one of these available for download.

Rick
 
Nope, but you can create your own easily enough.

Just create a form, put a textbox and command buttons on it, in the OK command button, put:
THISFORM.Tag = THISFORM.TextBox1.Value
THISFORM.Release

in the cancel button put:
THISFORM.Tag = ''
THISFORM.Release

in THISFORM.Release put:
=DODEFAULT()
RETURN THISFORM.Tag

and set the form's WindowType to Modal,

Take any parameters in THISFORM.Init and use them to set up any labels, etc on the form, and to call it:
DO FORM myInputForm WITH whatever,parameters,init,wants TO answer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top