Archived

This topic is now archived and is closed to further replies.

AbeE

General windows question

Recommended Posts

Does anyone know how or know where there is a tutorial on how to make programs load when windows loads and display them in the teskbar at the bottom right of the screen. Thanks

Share this post


Link to post
Share on other sites
Just stick a shortcut to whatever you want to run when the system starts in the Startup folder on the start menu.

Its good practice to run as few programs in the background as possable.

I run my Opticel mouse thingy, a small resource monitor, and 3dfx drivers.

You can use the run command, and type msconfig.exe to modify the system startup more.

Share this post


Link to post
Share on other sites
Several ways to start your program on boot:
-Registry keys at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
-A shortcut in the startup folder
-Entries in the WIN.INI under load= or run=

As for an icon in the taskbar, it's a bit more complex. The methods basically revolve around the API function Shell_NotifyIcon. You can search the net for it, or try this page:
Inquiry.com Article: Programming the System Tray

Edited by - feagle814 on November 14, 2001 12:55:00 AM

Share this post


Link to post
Share on other sites
Thanks for the help and links. Do you know how to start the program, but have in running without a window, if you know what I mean. Like a program may be running, getting the date and time from the system and at a certain time will remind you to do something. I want it to run and do this but without having a large minimised window running as well.
Thanks again

Share this post


Link to post
Share on other sites
That all depends on which compiler/kit you''re using. If you''re doing it from scratch, simply don''t create the window until you''re ready to display it. If your compiler suite makes a window for you, try and hide it (commonly by setting a Visible property to false or similar method) instead of minimizing it.

Share this post


Link to post
Share on other sites
Thanks for your help mate, but it seems I was getting ahead of myself. I am having trouble just displaying the icon. I have done exactly as the tutorial said on the link you posted, except for one line:
Instead of
nid.hIcon = LoadImage(hInstance, MAKEINTRESOURCE (IDI_WINLOGO) ,IMAGE_ICON, 16, 16, 0);

I have:
nid.hIcon = LoadIcon(NULL, IDI_WINLOGO);

Because I was getting the compiler error:
ANSI C++ forbids implicit conversion from `void *'' in assignment

Anyway, the problem is that my icon appears when the program starts but as soon as I run the mouse over it, it disappears, as if I had exited the program.

Thanks once again
:-)

Share this post


Link to post
Share on other sites