Click to See Complete Forum and Search --> : How to add program Icon to desktop and starup menu?
February 7th, 2000, 02:34 PM
Hello,
I want to add my program icon to desktop or starup manu when i install it. Please tell me How to? Thank your for any help!
Astinite
February 7th, 2000, 04:26 PM
All you have to do is go through the package and deployment wizard and deploy it (after you package it). There is a screen that will let you pick where in the start menu you want to put the shortcut.
As far as adding the icon to it, you just have to pick an icon for the project with the icon property of the main form your working with. (typically i set all my forms to the same icon).
Starcraft
February 7th, 2000, 07:03 PM
you could:
filecopy app.path & "\whatever.ico", "c:\C:\WINDOWS\All Users\Desktop\whatever.ico"
for that to work you have to have that icon in the same directory as the .exe file. if you want to add to the start menu:
mkdir "C:\WINDOWS\Start Menu\Programs\CoMpAnY NaMe"
filecopy app.path & "\whatever.ico", "C:\WINDOWS\Start Menu\Programs\CoMpAnY NaMe\whatever.ico"
if you dont no where the person downloaded the file to ask the codeguro thing how to search for a certain file.
Starcraft
February 7th, 2000, 07:09 PM
if you dont have a icon maker click this link:
http://www.impactsoft.com/muangelo/download/mike98b.exe
Cakkie
February 8th, 2000, 12:38 AM
Hmm, it just got to me that it looks like that the icons realy have to do something. The way you describe it will actually place an icon on the desktop and start menu, but wouldn't it be nice that when you press the icon, the application lauches?
Try this
'declare in module
private Declare Function fCreateShellLink Lib "vb5stkit.dll" (byval Forder as string, byval ShortCutName as string, byval ExePath as string, byval Params as string) as Long
'anywere in project
Dim retVal as Long
retVal = fCreateShellLink("..\..\Desktop", "MyName", "c:\myApp\myApp.exe", "")
this should normally create a shotcut on the desktop, the icon will be the one from the file reffered to. It will have the name MyName.
In the code above, the link on the desktop called MyApp, refers to the file c:\myApp\myApp.exe
Tom Cannaerts
slisse@planetinternet.be
The best way to escape a problem, is to solve it.
Chris Eastwood
February 8th, 2000, 02:49 AM
If you are creating an installation setup for your program (and you should be!) using PDW / Installshield etc, you *should* have a link created automatically for you in the folder/menu that you specify.
To add a desktop shortcut to your program (or a shortcut from anywhere else), you can use the Windows Scripting Host (WSHOM.OCX - comes with VB6 or downloadable from http://msdn.microsoft.com) to create shortcuts for you. Take a look at this link :
http://codeguru.developer.com/vb/articles/1923.shtml
- that shows how to use the WSH to create desktop shortcuts and gives full access to their properties.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
February 9th, 2000, 04:45 AM
Hello,
What is PDW/Installshield? And in the article:
http://codeguru.developer.com/vb/articles/1923.shtml
It needs to run the program to create shortcut to desktop. How to make it create shortcut when installs the program? Thank you for your help!!
Chris Eastwood
February 9th, 2000, 06:29 AM
PDW stands for 'Package and Deployment Wizard'. This is a utility program that comes with VB6 (it's called Setup Wizard in VB5). This program will create a 'setup' installation for your VB program including the relevant run-time DLL's and Controls. Installshield is a 3rd party program similar to PDW that offers more control over the installation process.
Look under: Start->Programs->Microsoft Visual Studio->Microsoft Visual Studio 6->Tools
If you don't use a setup program (eg. PDW, or Installshield) when installing your software onto other computers, you're just asking for all kinds of trouble.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.