General windows question
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
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.
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.
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
-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
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
Thanks again
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.
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
:-)
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
:-)
The icon disappears when its parent window (the one specified in NOTIFYICONDATA) no longer exists. Are you giving it a valid window handle?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement