Results 1 to 2 of 2

Thread: Send to SysTray in Console App?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2004
    Posts
    102

    Send to SysTray in Console App?

    Ive heard its possible but I dont think it is, does anyone know it Im wasting my time looking for how to get my console app to the systray??

  2. #2
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: Send to SysTray in Console App?

    Sure it is, this is OOP

    VB Code:
    1. Sub Main()
    2.         Dim f As New System.Windows.Forms.NotifyIcon
    3.         f.Icon = New System.Drawing.Icon("Z:\jobwiz.ico")
    4.         f.Visible = True
    5.         Console.Read()
    6.     End Sub

    Of course, all context menus, handlers for click events, etc will need to be made manually.

    Oh, and you'll need a reference to System.Windows.Forms, and System.Drawing. Heh, so uh.. what's the point of it being a console app when all's said and done

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

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