CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 1999
    Posts
    32

    Run program and show in tray on start

    I have an app that needs to monitor the time and date when windows starts and therefore should run on windows start in the tray. How do I go about displaying it in the tray? Can I have the program run by inserting it in the startup group or do I need to place it in the proper RUN key of the registry? Wondering how this is done using VB6 ...

    Thanks


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Run program and show in tray on start

    MSDN article Q176085 has all the details and sample code for manipulating the system tray.
    you can add your program to the AutoStart group.


  3. #3
    Join Date
    Aug 1999
    Location
    Pakistan
    Posts
    366

    Re: Run program and show in tray on start

    Hello
    Modify the setup1.exe file that comes with vb.
    Use the setup1.frm form and locate the place where it says that it will place the icons or place the files after setup is complete.then save the project.
    I am also in the testing stage so keep in touch


  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Run program and show in tray on start

    I've written a small application that shows how to have multiple icons in the system tray and respond to each one as required. This is probably over the top for what you want to do, but the code for placing and icon and removing it should help.


    Take a look at http://www.codeguru.com/vb/articles/1715.shtml

    By the way - you can see the number of Milliseconds since windows was started by using the GetTickCount() API, so by using a little math you can get the date, number of days etc.



    private Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () as Long





    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

  5. #5
    Join Date
    Jun 1999
    Posts
    32

    Re: Run program and show in tray on start

    Thanks Chris,

    This put me on the track of the info I need. I haven't had a chance to set it up yet but it answers the questions that come to mind ...


  6. #6
    Join Date
    Jun 1999
    Posts
    32

    Re: Run program and show in tray on start

    Hi Cheml,

    Thanks for the tip about how to get it installed properly. I'll keep this in mind once I get the program written.


  7. #7
    Join Date
    Jun 1999
    Posts
    32

    Re: Run program and show in tray on start

    Thanks Lothar,

    That article along with the other suggestions and information has me on track to what I want to do.


  8. #8
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: ... Aside


    There seems to be a bug in this rating system!!
    This post of yours had 10 points (1 vote), excellent.
    I added "Good Suggestion" 3 points, so should be 13 points(2Votes) but shows 6 points ( 2 votes)?!?

    Somebody should be notified about this?!!

    RK

  9. #9
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: ... Aside

    I just noticed it also - I've mailed the site owner for him to investigate (it's 3:30 am there now, so don't expect it to be fixed for a while)


    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

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

Featured