Hide when minimized

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    Hide when minimized

    Hi all,

    Wondering if it is possible to hide my app when minimized?

    The say way task manager works when you click > options > hide when minimized.
    Or the same way outlook is running next to the syetm clock etc?

    Cheers James
    Attached Files
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    I've solved this now:

    THis link helped:

    http://www.startvbdotn et.com/controls/notifyicon.aspx

    Comment

    • shuvo2k6
      New Member
      • Jan 2008
      • 68

      #3
      Originally posted by jamesd0142
      Hi all,

      Wondering if it is possible to hide my app when minimized?

      The say way task manager works when you click > options > hide when minimized.
      Or the same way outlook is running next to the syetm clock etc?

      Cheers James
      Hi,
      u can try by this following code:

      Code:
      Private Type NOTIFYICONDATA
      cbSize As Long
      hWnd As Long
      uId As Long
      uFlags As Long
      ucallbackMessage As Long
      hIcon As Long
      szTip As String * 64
      End Type
      Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
      Dim tr As NOTIFYICONDATA
      Private Sub Form_Load()
      tr.hWnd = Me.hWnd
      tr.uFlags = 2
      tr.hIcon = Me.Icon
      Shell_NotifyIcon 0, tr
      End Sub
      Private Sub Form_Unload(Cancel As Integer)
      Shell_NotifyIcon 2, tr
      End Sub
      if u get success, reply me.
      Get Better.

      Again,
      shuvo2k6

      Comment

      Working...