• 0

[vb.net] Notify Icon Help


Question

hi i need your help with a vb.net sollution im working with

ive got a form named form1 and ive added a notify icon to it

the notify icon gets displayed in the systemtray by default as its visible property is set to true

can u plese tell me the event that occurs when a form is minimised so that i can make the notify icon visible only when the form is minimised

in other words

i need the notify icon to be displayed when the form is minimised and be hidden when the form is in normal state

thanks for your assistance

Link to comment
https://www.neowin.net/forum/topic/52850-vbnet-notify-icon-help/
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The timer method would work, although I'm not too fond of using timers. You could use a subroutine something like this:

Sub HideShowNotifyIcon()

Select Case Me.WindowState

Case FormWindowState.Normal

Me.NotifyIcon1.Visible = False

Case Else

Me.NotifyIcon1.Visible = True

End Select

End Sub

I do believe that this should work under the form activation/deactivation methods, if you prefer not to use a timer. One thing to note is that although it will work under activate/deactivate, this is only true if the user actually clicks the minimize button on the form itself; if the user otherwise clicks the taskbar button I'm not so it'll work.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I really do like the design of the iPhone 16 Pro Max. It is quite nice.
    • If the entire industry adhered to fundamental principles of Microsoft's Next-Generation Secure Computing Base (NGSCB), there might not have been a basis of the existence of this article.
    • Ashes of the Singularity II announced promising even larger battles, new faction, and more by Pulasthi Ariyasinghe A sequel for the 2016-released Ashes of the Singularity has officially been confirmed, and the original developer and publisher duo, Oxide Games and Stardock Entertainment, are back for this release too. Check out the debut trailer above. Ashes of the Singularity II is under development with a significantly expanded team compared to the original, according to today's announcement. It will be adding in a range of fresh units and gameplay systems for real-time strategy fans to dive into. More options for strategic gameplay, more intricate base building, and better enemy AI are listed as features for the new game as well. "Ten years ago, we set a new, literal benchmark for RTS games with massive battles and groundbreaking technology," said Brad Wardell, CEO of Stardock Entertainment. "With Ashes of the Singularity II, we’re raising the bar even higher, delivering strategic gameplay depth that RTS fans have always dreamed of.” The storyline of Ashes of the Singularity II will take place in 2031, with a complete single-player campaign, as well as cooperative and competitive multiplayer modes, being confirmed as features today. Moreover, a third faction is joining the fray this time, with Humans joining the fight alongside the original games' Post-Human Coalition and the Substrate. "Obviously, in the first game, the number one request was to have a human faction," adds Wardell. “Back then, we just couldn’t support having thousands of organic, walking, squishy people in the world and thus had to design in favor of machines. We’re really excited to bring the humans into the war and watch how they fare against the massive mechanical armies of the Substrate and PHC.” Ashes of the Singularity II is targeting a broad 2026 release window, with the team hoping to launch the title as the original celebrates its 10th anniversary. Its Steam store page is already up for wishlisting over here. Disclaimer: Neowin's relationship to Stardock
    • How exactly is a FREE image generation model a... Ponzi scheme?!?! I don't love all of these Gen-AI things flooding the market but there's nothing "ponzi" about it.
  • Recent Achievements

    • One Month Later
      SamZrize earned a badge
      One Month Later
    • Week One Done
      SamZrize earned a badge
      Week One Done
    • One Year In
      SamZrize earned a badge
      One Year In
    • One Year In
      barracuda earned a badge
      One Year In
    • One Month Later
      barracuda earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      723
    2. 2
      +FloatingFatMan
      189
    3. 3
      ATLien_0
      180
    4. 4
      Xenon
      113
    5. 5
      neufuse
      109
  • Tell a friend

    Love Neowin? Tell a friend!