INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Is it possible to minimize an MDI Parent form into the System Tray?

Is it possible to minimize an MDI Parent form into the System Tray?

Is it possible to minimize an MDI Parent form into the System Tray?

(OP)
My project use a MDI application. I want to minimize my main form into the System Tray. I've search for the coding but I found coding for Form to System Tray. But it's not work for MDIForm. What can be done to achieve the same result?

Thanks

RE: Is it possible to minimize an MDI Parent form into the System Tray?

What am I missing?

CODE

MdiFormName.WindowState = vbMinimized 

RE: Is it possible to minimize an MDI Parent form into the System Tray?

System tray, not task bar ...

RE: Is it possible to minimize an MDI Parent form into the System Tray?

Thanks, I knew I had to be missing something. Turns out it was so big I couldn't see it. winky smile

I just took an existing small MDI demo and added "minimize to tray" and a simple "restore on tray icon click" to the MDIForm. Works fine, as expected.

Perhaps you can describe the specific thing you need help with.

RE: Is it possible to minimize an MDI Parent form into the System Tray?

I tested that using the version 5 NotifyIcon.ctl from NotifyIcon - Tray Icon Control.

I just added the Subclasser.bas and Notifyicon.ctl modules to the MDI Project, added an instance of the NotifyIcon control to the MDIForm, assigned it an Icon, added code:

CODE

Private Sub MDIForm_Resize()
    If WindowState = vbMinimized Then NotifyIcon1.MinimizeToTray Me
End Sub

Private Sub NotifyIcon1_Click()
    NotifyIcon1.Restore True
End Sub 

RE: Is it possible to minimize an MDI Parent form into the System Tray?

(OP)
Hi dilettante and strongm
Everything worked perfectly.
Thanks for your help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close