|
-
Oct 6th, 2008, 04:17 PM
#1
[RESOLVED] MainMenu on Form
Hey
Just a quick question...
On my form I have a MainMenu control with lots of options in it. Is there a way to close this menu after a certain period of time?
At the minute, the user has to click on the menu again to close it. I was hoping to make it auto-hide after say 10 seconds.
Thanks
Gary
-
Oct 7th, 2008, 01:58 AM
#2
Frenzied Member
Re: MainMenu on Form
Hi,
in the popup, start a timer, and when the timer fires, do a 'sendkeys' of "{Esc}".
OpennetCF has an implementation of sendkeys, or you can use the keybd_event API
Pete
-
Oct 7th, 2008, 10:51 AM
#3
Re: MainMenu on Form
Noice!!!
I love the out of the box thinking!! Thanks for that!!!
Gary
Edit:
I tried to rate you but it wasn't to be 
"You must spread some Reputation around before giving it to petevick again."
-
Oct 10th, 2008, 04:17 PM
#4
Re: [RESOLVED] MainMenu on Form
Hey Pete,
I have got this to work really well, and what I am trying to avoid is adding a timer to each form that I have. How can I add this functionality to each mainmenu control that I have? I am familiar with the concept of inheritance, and I already have a FormBase which all the other forms derive from, but as soon as I put the P/Invoke in there, I get a message on the inherited form that visual inheritance is disabled since I am using a P/Invoke.
How can I get round this?
Thanks
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|