Results 1 to 19 of 19

Thread: Shortcut Question for VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    10

    Shortcut Question for VB6

    I have the following code for creating a shortcut

    VB Code:
    1. Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" _
    2.     (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, _
    3.     ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
    4.  
    5. dim result as long
    6.  
    7. 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

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    10

    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?

  4. #4
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Shortcut Question for VB6

    why cant you just send him the dll? obviously you have it!

    to resolve edit the first post

  5. #5

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Shortcut Question for VB6

    Quote 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.

  7. #7
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Shortcut Question for VB6

    what more do you need than that?

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  9. #9
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    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?

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  11. #11
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Shortcut Question for VB6

    no offense, but how do you know this is the way it "should" be done?

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  13. #13
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Shortcut Question for VB6

    i think this is more of an opinion rather than a fact...

  14. #14
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  15. #15
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Shortcut Question for VB6

    |2eM!x,

    You might even want to read this.

  16. #16
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Shortcut Question for VB6

    |2eM!x, you said yourself :

    Almost everyone has the vb runtime files
    Keyword is almost... Won't you want to be sure that it works for everyone? Cause then it's extra trouble for them to find and download the vb runtimes... Plus, what is 1 more megabyte (I think that's how much the vb runtimes are)? Even for dial-up that I have?


    Has someone helped you? Then you can Rate their helpful post.

  17. #17
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    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 )

  18. #18
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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?

  19. #19
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width