Results 1 to 9 of 9

Thread: Using contextmenu?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Using contextmenu?

    Can a contextmenu be used in a VB.Net 2005 console application? If so, how do I create the necessary events. I know how to create the control but not sure about the needed events. I'm thinking the only one I really need is the "Click" event.

    Thanks,
    Blake

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Using contextmenu?

    not that I am aware of, no.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Using contextmenu?

    Kleinma,

    In that case, if I use it in a Windows app, how can I get the NotifiyIcon to show up in the Systray without the Form being active even though it's minimized? I basically don't want the Form to show at all.
    Blake

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Using contextmenu?

    Do you NOT want a console window OR winform window, and ONLY a notify icon?

    Or do you want a console window that has a notify icon?

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Using contextmenu?

    It's a Windows application that will display various Forms, however, on startup of the application, I only want the NotifyIcon to show in the systray and nothing else. Forms will eventually popup based on menu selections from the contextmenu.
    Blake

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Using contextmenu?

    you are using 2005 or 2008? I can give you a quick sample code showing how to create a notifyicon and context menu in a Sub Main and not load a form until needed.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Using contextmenu?

    I'm using 2005 and your example would be perfect!

    Thanks,
    Blake

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Using contextmenu?

    here, see how this works for you.
    Attached Files Attached Files

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Using contextmenu?

    That's exactly what I was looking for. One more thing if you don't mind and I know it's a different topic but how would I get a program to start upon bootup while placing the icon in the systray?

    Thanks bro,
    Blake

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