Hi

just wondering how i would set up a menu so that i can call anytime when pressing "M". im nearly sure it would have to be a loop but im not quite sure how to do it. can anybody help? thanks

Hi

I'm lookin for a way to not have to call the function so that the user can input randomly

Hi

Randomly as in when ever they want to view the menu they can press m and I'm looking for a way to to it without placing lots of function calls in my code

There's too little information for us to make even a guess at what you need. Sorry. Details, code, and design are missing from your question.

His question is pretty clear to me.. He wants a menu in his program and when a user presses "M", the menu shows/hides itself. The user can press "M" at any time during execution. Doesn't matter where in the program they press it..


I would do something like:
Create a backgroundworker/thread that checks for the press of the 'M' key while the program is active/visible on screen. When 'M' is pressed, the menu opens.. simple as that.
Basically a thread with a hotkey 'M'. Also you might wanna specify if your using .Net or just a plain old console program or Win32 API.

His question is pretty clear to me.. He wants a menu in his program and when a user presses "M", the menu shows/hides itself. The user can press "M" at any time during execution. Doesn't matter where in the program they press it..


I would do something like:
Create a backgroundworker/thread that checks for the press of the 'M' key while the program is active/visible on screen. When 'M' is pressed, the menu opens.. simple as that.
Basically a thread with a hotkey 'M'. Also you might wanna specify if your using .Net or just a plain old console program or Win32 API.

thanks man i got it working i found a thing called strcmp to compare chars together works like a charm. thanks :)

This question has already been answered. Start a new discussion instead.