I develop accounting program using VFP ver 6.0 and I have not been able to place the program shortcut icon on main screen. Help to do this will be greatly appreciated.
Have you created the installation setup kit?
If you have - what was used to create it, Setup Wizard ("Dullard!" ) or Install Shield?
And mainly: did you attach the icon to the EXE file in the Project Info menu/dialog?
Thanks a lot for trying to help me. I used native VFP 6.0 tools to create distribution disks. Icon is included in the .exe. I found Setup Wizard and Install Shield too conversome in addition to price.
- Create the icon on your own computer, and write a "post-executable setup" to transfer it to the user's system (a batch file will be sufficient).
- Write a little program that calls the Windows Scripting Host. This has a method for creating desktop shortcuts.
You can find code for both the above methods in my article,"Creating desktop icons for Visual FoxPro applications", which is at:
Thanks a lot for your advise. I will investigate more about this. Perhaps this is easier than I thought.
Thanks Again. I will let you know about my progress.
Hmm. That's a good question. If the user chooses the directory, you've got no way of knowing which directory contains the executable, so you can't create the shortcut. The only solution I can think of is to ask the user again which directory they chose, or search the hard drive for the EXE -- neither option is particularly satisfactory.
I guess that's one of the disadvantages of using the Setup Wizard. With InstallShield Express (or any other proper insatll program), it woulnd't be a problem.
You could always put an entry in the registry of where the product is installed... I keep both the app path and the data path in the registry with my applications. I make the entries using Installshield Professional, dunno if you can do the same with the setup programs being spoken of here.
Slighthaze = NULL
[ul][li]FAQ184-2483 An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
This is a method I got from MSDN using the VBstkit.dll - I've included it in my Application (in a form method) so everyt time it runs it creates it's own shortcut.
I've modified it a bit, If you want the original, search the MS site (can't remember the URL)
******* CODE BELOW ************
* Heavily cut down version of the microsoft download example
* CREATE DESKTOP SHORTCUT- using shell api fCreateShellLink
lcExeName = "MYEXE.exe" && *~ lcExeName: This is the actual file name (without any path) of the .EXE to create a shortcut to.
lcAppName = "MY EXE NAME" &&*~ lcAppName: This is the name of the application (like "Microsoft Visual FoxPro".
*~ Declare the function in the VB DLL
DECLARE INTEGER fCreateShellLink IN vb6stkit.DLL ;
STRING lpstrFolderName, ;
STRING lpstrLinkName, ;
STRING lpstrLinkPath, ;
STRING lpstrLinkArguments, ;
INTEGER fPrivate, ;
STRING sParent
*~ Set up variables. These variables remain unchanged.
strLinkPath = JUSTPATH(SYS(16,0)) + "\" + lcExeName + CHR(0) && path of current running app
strLinkName = "Shortcut to " + ALLT(lcAppName)
strLinkArguments = "" + CHR(0)
fPrivate = -1
strGroupName = "..\..\Desktop"
sParent = "$(Programs)"
But I want to give the details to shortcut from which directroy it has to start or working directroy what is the property of oshort in the above example
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.