By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Hide when minimized

jamesd0142
100+
P: 469
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 Images
 
Feb 4 '08 #1
Share this Question
Share on Google+
2 Replies


jamesd0142
100+
P: 469
I've solved this now:

THis link helped:

http://www.startvbdotnet.com/controls/notifyicon.aspx
Feb 4 '08 #2

P: 68
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:

Expand|Select|Wrap|Line Numbers
  1. Private Type NOTIFYICONDATA
  2. cbSize As Long
  3. hWnd As Long
  4. uId As Long
  5. uFlags As Long
  6. ucallbackMessage As Long
  7. hIcon As Long
  8. szTip As String * 64
  9. End Type
  10. Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
  11. Dim tr As NOTIFYICONDATA
  12. Private Sub Form_Load()
  13. tr.hWnd = Me.hWnd
  14. tr.uFlags = 2
  15. tr.hIcon = Me.Icon
  16. Shell_NotifyIcon 0, tr
  17. End Sub
  18. Private Sub Form_Unload(Cancel As Integer)
  19. Shell_NotifyIcon 2, tr
  20. End Sub
  21.  
if u get success, reply me.
Get Better.

Again,
shuvo2k6
Feb 4 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.