Results 1 to 11 of 11

Thread: System Tray Iconquestion -> Resolved

  1. #1

    Thread Starter
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519

    System Tray Iconquestion -> Resolved

    Is it possible to make my systm tray icon be a text box?

    I would like to display a word (That will be constantly changing) is possible..

    Any ideas?

    Rudy
    Last edited by RudyL; Dec 11th, 2003 at 10:32 PM.
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    As long as the words are not dynamically made, you could have different icons for the possiblities, and display different icons in the taskbar.

    Short of that, even if you were making random words to put down there, you could probably figure out a way to have VB create an icon file which you could then use as the system tray icon.

    However, with the small space that your icon is allowed to occupy in the taskbar, the words could not be very big at all, so I'd suggest you find another route.

    Would it be just as good to change the caption of your form??
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3

    Thread Starter
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Thanks for the reply, but changing the caption is not an option.

    Let me explain the project a little..

    There is this proggram, it provides stock market data for user difined tickers.

    I would like to display one fo the tickers (User selectd) current stock price in the system tray. Just like Weatherbug does. So an example of a value would be "23.57" and that would be displayed in the system tray.

    Rudy
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  4. #4
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I don't know what WeatherBug is or how it works.... I think you'd be just as well off to make a window that "stays on top" and allow the user to place it wherever he/she chooses.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  5. #5

    Thread Starter
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    I already have that. It works great, but I have gotten a sizeable amount of requests to do this.

    FYI, WeatherBug is a program that will display the current temp. for a user defined zipcode in the system tray.

    Check it out --> WeatherBug, it is actually really cool.
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  6. #6
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    A demonstration I made for fun. If this isn't cool, what is?
    Attached Files Attached Files

  7. #7
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Made it a bit more l33t and fixed a bug or two. Reminds me of demo scene.
    Attached Files Attached Files

  8. #8

    Thread Starter
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Originally posted by Merri
    Made it a bit more l33t and fixed a bug or two. Reminds me of demo scene.
    I have to say , that is really cool! It will take some time for me to figure everything out! Thanks for the example.

    WAY COOL!

    Rudy
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  9. #9
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Glad you liked it Some more tweaks:

    VB Code:
    1. 'in Form_Load:
    2.  
    3.     'set the actual draw window width
    4.     Systray.Width = Systray.Height * A + UBound(nID) * 30
    5.  
    6.  
    7. 'in Timer1_Timer:
    8.  
    9.         'copy a block
    10.         BitBlt tmpIcon(B).hDC, 0, 0, 16, 16, Systray.hDC, (UBound(nID) - B) * 18, 0, vbSrcCopy

    This little change makes the text go a bit smoother in the systray icons by not displaying the two pixels in between them.

    If you have any questions, I guess I can answer

  10. #10

    Thread Starter
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Cool.. Thanks again for the example..

    If you don't mind I would like to use it in my pgm.. With credit to you of course... I might make an OCX our of it.. So I can use it more often..

    Sound good?
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  11. #11
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Yeah, I have no problem with it. I actually only combined an old project file from my archives made by someone else with a tip I found from here and I only required to add support for multiple icons and the graphics drawing

    I guess the graphics could be faster to convert to icons through API, but I have no interest on starting to mess up with graphic formats

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