Results 1 to 13 of 13
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Minimise next to clock (VB6sp6 xpsr1)

    What is the code to minimise a program to the taskbar next to the clock?
    "Heading for the deep end"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    See for example example on AllAPI site.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Thanks Hans for the link, I've now been able to set up my little program just how I always wanted.

    Regards, Allan
    "Heading for the deep end"

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Hans, I'm sure I'm being thick here again, but how do you use that API example? When I downloaded it it contained four files, none with suffixes I recognised and no read-me or instructions, either with the download or on the site!

    Many thanks
    Beryl M


  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Did you download the All-API guide? You should have an executable called API-Guide.exe. Never mind, I just realized you had downloaded the Tray project. TrayIcon.vbp is the VB project. Did you wind up with something else?
    Charlotte

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Hi Charlotte, thanks for the comments and no, I haven't downloaded the API guide - I did look at it but it just looked like an offline listing of the available projects, I couldn't see any instructions how to use it.

    Yes, trayicon.vbp was one of the four files included, but when I doubleclicked on it I just got the message that there was no viewer associated with it and did I want to try the default viewer. I got the same message for the other three, too.

    However, I am beginning to realise that this project is in VB, not VBA - does that mean I wouldn't be able to use it (I don't know any VB, specifically, only VBA)? I'll be disappointed, if so, because I'd really like something that would enable me to minimise things to the tray!
    Beryl M


  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    The example you downloaded is indeed a VB6 project - this thread is about VB6, not VBA. Although you can take a peek at the code in TrayIcon.Frm with NotePad or another text editor, you won't be able to do much with it. With VB6, you can create stand-alone applications; in some circumstances it is handy to be able to minimize them to the notification area (aka system tray). In VBA, this makes less sense, since VBA always runs within one of the Office applications (Word, Excel, ...) You cannot create stand-alone applications with VBA. Minimizing Word or Excel to the notification area goes against the expectations of users.

  8. #8
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Yes, I thought it would be something like that.

    I don't suppose you know of any little shareware or freeware programs that would enable you to minimise active programs to the system tray (ie to a single small icon instead of a large button)?

    Just a (hopeful) thought ...!

    Ta muchly
    Beryl M


  9. #9
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Tray Notification Area (VB6sp6 xpsr1)

    For anyone interested in this subject, Microsoft has also published several (similar) MSKB articles with sample VB code:

    How To Use Icons with the Windows 95/98/Me Taskbar Notification Area

    HOWTO: Use the System Tray Directly from Visual Basic

    How To Manipulate Icons in the System Tray with Visual Basic

    NOTE: The last article listed (162613) provides more detailed info than the others, for those interested in such details.... The code samples seemed to work OK in tests. On a related note, there's a MSKB article that explains how to determine the status of the Windows taskbar, which may be useful when manipulating the System Tray:

    How To Determine if Windows 95/98/Me Taskbar Is Visible/Hidden

    All of the articles cited above are applicable to Visual Basic 5.0/6.0.

    HTH

  10. #10
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Beryl,

    You may be in luck! On one of the computer mag disks I got not too long ago there was a freeware program that did just that. I used it for a while. I will look for it tomorrow and see if I can find it for you.

    Here's hoping !

    Allan
    "Heading for the deep end"

  11. #11
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16> <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Beryl M


  12. #12
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Beryl, you can use the minimize to system tray in VBA. My last version of my 'MiniCalendar' for Access (97) would allow you to hide the Access window, so the calendar is on the desktop all by itself. In 'cycle mode' (where you move the mouse around the calendar, and the day your mouse is over shows it's data in another form), there is a 'sleep' button, that 'minimizes' the Minicalendar to the system tray.

    On another note, my brother asked me to write up a VB program to minimize all windows to the system tray (or under one tray icon), to clear up his taskbar. Haven't gotten around to writing it yet though. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Unfortunately, the zipped version of MIniCalendar3.zip is 284k, too big to post to the lounge. Also, my website is down right now (having quite a battle with my DSL company at the moment), so I can't tell you to download it from there. If you want a copy of it, message me, and I'll email you a copy.

  13. #13
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Minimise next to clock (VB6sp6 xpsr1)

    Hi Drew, in that case you might be interested to know that Allan found the item he was looking for, sent it to me direct and (after he'd told me how to use it!) I found it worked exactly as advertised - ie it adds a few items to the title menu of each window (top left corner of the window), one of which is minimise to system tray, which does exactly that.

    I'm attaching a copy of the zip file (it's freeware - I've checked); you might find it saves you having to write that program for your brother! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Many thanks, Allan!
    Beryl M


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •