Results 1 to 5 of 5

Thread: Notification Icon

  1. #1

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435

    Notification Icon

    I can create a notification icon to appear in the Systray, but how do I hide the Icon when the form is showing, show the icon but hide the form when minimized, create a menu on right clicking the icon, and be able to activate the chosen menu item on the notification icon?

    Could someone possible point me in the right direction?

    Thanks.
    Last edited by RealNickyDude; Jan 24th, 2003 at 10:53 AM.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    I have this in one of my apps, there is some junk depending on what culture info we use, because its built for the swedish market. But I think you can filter out how its done....

    Code:
    With niFrontend
        .Visible = True
        Dim ci As System.Globalization.CultureInfo = System.Globalization.CultureInfo.CurrentCulture
        Dim mnu(1) As MenuItem
        If Strings.Left(ci.Name, 2) = "en" Then
            mnu(0) = New MenuItem("Tools...", New EventHandler(AddressOf Me.btnTools_Click))
            mnu(1) = New MenuItem("Quit", New EventHandler(AddressOf Me.btnClose_Click))
        Else
            mnu(0) = New MenuItem("Verktyg...", New EventHandler(AddressOf Me.btnTools_Click))
            mnu(1) = New MenuItem("Avsluta", New EventHandler(AddressOf Me.btnClose_Click))
        End If
        Dim niMenu As New ContextMenu(mnu)
        .ContextMenu = niMenu
    End With
    If you have added your contextmenu at designtime you wouldn't have to do any of this but only to set the contextmenu property of your notification menu to the added context menu.

  3. #3

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Thanks, where would I put this?
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  4. #4
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    I had it in the load event of the main form.

  5. #5

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Thanks Athley, I have most of it worked out, just a few questions:

    1/. How do I hide the icon when the form is on show?
    2/. How do I make the icon visible when the user minimizes the form?
    3/. How do I hide the from completely when minimized?

    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

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