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

post a message / show a menu option

Status
Not open for further replies.

yomyom

Programmer
Dec 23, 2002
119
GB
Hello all,
I want to allow a menu option to show once an action has occured. I don't want the event attached to the option to run, just for the option to be exposed and highlighted as though the user has the intention of selecting that option.
I'm doing this so as to dynamically prompt the user to select the option, while preventing the user from looking for it.

I don't know how to call the postmessage routines so I need help.
Thanks inadvance.
yomyom.
 
The type of interface you are suggesting would be strange and unexpected. The user would probably just think that he made a mistake and pressed the wrong key. The more normal Windows way would be simply to display a dialog box. There you can describe the situation and say "I strongly urge you to click Ok at this point, but you may Cancel if you really know what you are doing." Or something like that. Then call whatever routine you would as if it had been attached to a menu item. (You can still have the menu item somewhere, and call the same routine from there.) See my post in thread102-499110 for my preferred way to display a dialog box.

On the other hand, if you are writing some sort of training software where you are telling the user what you are doing and then doing it, you might consider posting your question on the Windows API forum. Once you know the proper API call(s) to make, it should be possible to implement in Delphi.
 
Zathras hi,
You are right It would seem strange, however my entry form is rigged in a way that does not appear as if I've heard of oops. By this I mean that I've rigged up an API call to nextdialgctrl or something like that so that when the user presses enter, the focus shifts to the next control. I also have an onexit event ensuring that no blanks are entered and if no blanks are entered the next edit box gets focus. It stands to reason therefore that after pressing enter on the final box, the post menu option should be shown for the user to click.
I will post the question in the windows API forum. Thanks.
yomyom.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top