Results 1 to 11 of 11

Thread: [RESOLVED] Notifyicon

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Resolved [RESOLVED] Notifyicon

    I want to make that when you minimize the program, it will be removed from the taskbar, and only be visible as a notifyicon in the right site of the taskbar.
    And when you push the notifyicon it will open the program, and come back in the taskbar??

    How do i do this?? =)

  2. #2
    Junior Member
    Join Date
    Apr 2009
    Posts
    30

    Re: Notifyicon

    vbnet Code:
    1. Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
    2.         Me.Visible = True
    3.         NotifyIcon1.Visible = False
    4.         Me.WindowState = FormWindowState.Normal
    5.     End Sub
    6.  
    7.     Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
    8.         If Me.WindowState = FormWindowState.Minimized And cbxMinimize.Checked Then
    9.             NotifyIcon1.Visible = True
    10.             Me.Visible = False
    11.         End If
    12.     End Sub
    Last edited by AereoN; May 20th, 2009 at 05:26 AM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Re: Notifyicon

    Code:
        Private Sub btnLogin_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.SizeChanged
    It says that btnLogin.SizeChanged is an error??

    Anyway, thanks !!
    Eldrup

  4. #4
    Junior Member
    Join Date
    Apr 2009
    Posts
    30

    Re: Notifyicon

    Ops..
    Copied the wrong code from my project xD
    Updated the previous post with the correct code.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Re: Notifyicon

    cbxMinimize is an error too??
    Eldrup

  6. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    30

    Re: Notifyicon

    Quote Originally Posted by Eldrup View Post
    cbxMinimize is an error too??
    You can remove that if you want.
    I made a checkbox for the user to select if he wants the application to minimize to tray or not.
    If true = minimize to tray.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Re: Notifyicon

    Thank you so much :')
    It helped !
    Eldrup

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Question Notifyicon

    Well...When you rightclick the notifyicon, there should come some text.

    Etc. About, Exit .. How do i make this? (Allmost every notifyicon has this)...
    Eldrup

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Re: Notifyicon

    Someone please??
    Eldrup

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Notifyicon

    Add a ContextMenuStrip to your form and assign it to the ContextMenuStrip property of the NotifyIcon.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Location
    Denmark
    Posts
    132

    Re: Notifyicon

    Thank you !!
    Eldrup

Tags for this Thread

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