|
-
May 20th, 2005, 05:51 PM
#1
Thread Starter
New Member
Shortcut Question for VB6
I have the following code for creating a shortcut
VB Code:
Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" _
(ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
dim result as long
Result = fCreateShellLink("..\..\Desktop", ShortCutName, App.Path & "\exename.exe", (properties))
For the desktop shortcut path which is "..\..\Desktop" it works fine on my computer, but when I try to run the program on another system it doesnt put a shortcut on the desktop. Everything else works but the shortcut on the desktop so I tried to use an exact path such as "C:\Docume~1\Administrator\Desktop\" and then it doesnt even work on my computer. Anyone have any idea how to fix this so that it works on other computers and I can be exact as to where the shortcut is put?
Thanks,
jd
-
May 20th, 2005, 06:04 PM
#2
Re: Shortcut Question for VB6
remember, you need VB5STKIT.DLL on all computers it is installed on!
put it in the system folder or system32 folder (dont remember) and type
regsrvr vb5stkit.dll
-
May 20th, 2005, 06:52 PM
#3
Thread Starter
New Member
Re: Shortcut Question for VB6
ah crap. ok well thanks a ton. I guess I gotta go with the longer code for shortcut How to we make these resolved btw?
-
May 20th, 2005, 07:28 PM
#4
Re: Shortcut Question for VB6
why cant you just send him the dll? obviously you have it!
to resolve edit the first post
-
May 20th, 2005, 08:02 PM
#5
Re: Shortcut Question for VB6
You need to create an installation package in order to be sure your app will run on other people's PCs.
-
May 20th, 2005, 09:37 PM
#6
Re: Shortcut Question for VB6
 Originally Posted by |2eM!x
remember, you need VB5STKIT.DLL on all computers it is installed on!
put it in the system folder or system32 folder (dont remember) and type
regsrvr vb5stkit.dll
You need a lot more than that!!! This info is constantly repeated nausously. If you use an Installer it will do that for you.
-
May 20th, 2005, 11:27 PM
#7
Re: Shortcut Question for VB6
what more do you need than that?
-
May 20th, 2005, 11:39 PM
#8
Re: Shortcut Question for VB6
|2eM!x,
At least all of the VB6 Runtime files. Then if you included some references... some more files. Take a peek at some of the post in the forum. There are a slew of Noobie post on the very same subject of basically copying file to another computer for their apps to run.
If you get by with less it is just pure luck and it will run out!
In fact he should not even be using the VB5 dll he is using.
Last edited by randem; May 20th, 2005 at 11:46 PM.
-
May 21st, 2005, 01:53 AM
#9
Re: Shortcut Question for VB6
i have never ever needed to package any of that stuff. Almost everyone has the vb runtime files, and i just add the .dlls in a folder with a bat that registers them..
if you dont have the vb runtime files, use google, its what its for..
you dont need a bogus package that will just take up more space...
..
also, what happends when the user already has the files? theyve then just been forced to download and extra how many megabytes?
-
May 21st, 2005, 02:59 AM
#10
Re: Shortcut Question for VB6
|2eM!x,
Wake up . This is the information age a few megabytes??? Anyway most people don't make apps that simple as to where there are only a few things that need to be deployed.
Running a red light five times without an incident does not mean that runnng red lights is SAFE and the way it should be done.
-
May 21st, 2005, 10:38 AM
#11
Re: Shortcut Question for VB6
no offense, but how do you know this is the way it "should" be done?
-
May 21st, 2005, 12:01 PM
#12
Re: Shortcut Question for VB6
|2eM!x,
If you actually read many of the post on this site (or even this forum)... you would not have to ask that question.
-
May 21st, 2005, 12:08 PM
#13
Re: Shortcut Question for VB6
i think this is more of an opinion rather than a fact...
-
May 21st, 2005, 12:26 PM
#14
Re: Shortcut Question for VB6
|2eM!x,
You are entitled to your option, however wrong it may be. But reading should cure that. Wrong options can be cured however other things cannot.
Last edited by randem; May 21st, 2005 at 05:03 PM.
-
May 21st, 2005, 02:52 PM
#15
Re: Shortcut Question for VB6
|2eM!x,
You might even want to read this.
-
May 21st, 2005, 03:18 PM
#16
-
May 21st, 2005, 11:57 PM
#17
Re: Shortcut Question for VB6
well, i hate downloading more crap than i need. like on my installer for my modem, its got like a 500mb file on there that is not needed..i had to send that whole thing to my other computer until i realized that it wasnt needed...(my other comp dont have a cd drive )
-
May 23rd, 2005, 12:26 AM
#18
Re: Shortcut Question for VB6
500mb file on there that is not needed
Who makes the modem, what kind of driver is it?
Who deemed it not necessary?
And, how long does it take to xfer a file over the network?
-
May 23rd, 2005, 11:27 AM
#19
Re: Shortcut Question for VB6
As already posted a few times in this thread, in order to be sure your program will run on any other system you NEED to create
an installation package.
If your concerned about file sizes then you need to optimize the way you write your apps. Do not use controls when you
can use APIs to recreate them instead of using the ocxs, draw your graphics (where possible) instead of adding images to a
resource file, dynamically load your controls instead of having allot of controls added in design view of your forms, etc.
The use of APIs will help reduce your dependancies on other files. Most APIs are dependant upon the user32.dll, gdi32.dll,
advapi.dll, etc which are part of the core of Windows. Windows can not run without these and are included in every single
Windows installation from 3.1 and NT 3.51 to present.
Here are a couple of CodeBank links for creating a shortcut. You can incorporate them into your program or if you
use an installer then you can modify the P&D wizard to do it or use any of the other free installers in this forums FAQ. 
http://www.vbforums.com/showthread.php?t=234891
http://www.vbforums.com/showthread.php?t=272224
http://www.vbforums.com/showthread.php?t=322799
http://www.vbforums.com/showthread.php?t=231660
http://www.vbforums.com/showthread.php?t=269582
http://www.vbforums.com/showthread.php?t=277370
End of off topic discussions please. This thread was about creating a shortcut.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|