Results 1 to 13 of 13

Thread: Minimize to tray button

  1. #1
    Gerco
    Guest
    In the window title bar of my app, there is a minimize, maximize and close buttons. I saw another app (leechftp, getright) and it had a "minimize to tray" button, also in the window titlebar.

    Does anyone know how to add that button to the title bar and how to know if it was clicked?

    Gerco.

  2. #2
    Guest
    Anyone?

  3. #3
    Guest
    I guess noone knows...

    Defend your honor Matthew Gates and other guru's!

  4. #4
    Guest
    Matthew's not on at the moment but try this don't know where I got it from but it worked in one of mine
    Attached Files Attached Files

  5. #5
    Guest
    That looks fine, but I already know how to place an icon in the system tray...

    What I need is a button next to the minimize button to activate the minimize to tray function.

    Gerco.

  6. #6
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    I've seen apps using this, I would also like to know how to add an extra button to the control box of a form.

  7. #7
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Code:
    Private Sub Form_Resize()
    If Me.WindowState = vbMaximized Then
    Me.WindowState = vbNormal
    'Put your minimize to tray code here
    End If
    End Sub
    Does that help?
    <removed by admin>

  8. #8
    Hyperactive Member MetallicaD's Avatar
    Join Date
    Feb 2001
    Location
    Tallahassee, FL
    Posts
    488
    That code seems good, you could replace the max button with your min to tray button, but again.. how do you get your button onto the control box?
    [vbcode]
    '*****************************
    MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
    '*****************************
    [/vbcode]

  9. #9
    Gerco
    Guest
    I don't WANT to replace any button with a minimise to tray button. What I mean is this:

  10. #10
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Matthew Gates posted an example he made that allows you to do this, but I can't find it. Maybe you can ask him if he still has it, or the post number, so you can download it. It was pretty cool.
    <removed by admin>

  11. #11
    Hyperactive Member MetallicaD's Avatar
    Join Date
    Feb 2001
    Location
    Tallahassee, FL
    Posts
    488
    Attached is the code that Matthew Gates wrote.. i dont remember the thread i got this on..


    I like what he did here, but i dont like the way it looks
    Attached Files Attached Files
    [vbcode]
    '*****************************
    MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
    '*****************************
    [/vbcode]

  12. #12
    billfaceuk
    Guest
    Why don't you just set the form border style to zero
    add a label backgroung color=dark blue then add your own buttons. The form can still be moved if you use the api trick to move a form without title bar.

  13. #13
    Gerco
    Guest
    I tried, it, but I don't like it... so many programs have an extra button, there MUST be some 'standard' way of doing it...

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