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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messagebox Question

Status
Not open for further replies.

gmattox

Programmer
Nov 5, 2001
15
US
Is there a way to have the messagebox not select any button?
I have a customer that enters data so fast she keys right by the messagebox?
Thanks,
Gary
 
No. The MESSAGEBOX function is a call to the Windows API. Alternatively, you can build your own messagebox, but you'd have to place some other control before the buttons that can receive focus.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
You can control which button is selected by default.

Why not make the 'No' or 'Cancel' button as the default instead.

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
gmattox

You could use Yes/No buttons and make the No button the default.

John
 
You can also clear the keyboard buffer before launching the MessageBox:

Code:
* some keys throw a 0 then a scan code
DO WHILE InKey()>0 and inkey()>0
ENDDO
MessageBox("No keys in keyboard buffer now!")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top