Results 1 to 4 of 4

Thread: [RESOLVED] MainMenu on Form

Hybrid View

  1. #1

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Resolved [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

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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."

  4. #4

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width