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

Message Box Question 1

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hi,

I have an edit box in which the user types data.
when the user presses enter in the edit box, it calls the onclick event of a certain button, executing that code.

That code in the buttons onclick event triggers an OK message box.

My problem is that when the user presses enter to trigger the OK button on the Message box, it also triggers the enter press on the edit box, thereby constantly displaying the message box. To avoid this I have to click the OK button with the mouse. Is there away to allow them to press enter without calling the edit boxes OnKey press event?

Thanks
 
you could try placing
Key = 0;
right after you shoot off the message box under your OnKeyPress.

Let me know if that doesn't work.I think i've got some other ideas. Cyprus
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top