Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 18011
Number of posts: 55384

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
creating a shortcut Posted by MFH on 1 Feb 2007 at 1:29 PM
I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
What should I do?

Thanks for the help
There are 10 kind of people: those who understand binary code and those who don't understand it.
Report
Re: creating a shortcut Posted by BitByBit_Thor on 1 Feb 2007 at 2:59 PM
: I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
: What should I do?
:
: Thanks for the help
: There are 10 kind of people: those who understand binary code and those who don't understand it.
:

I'm affraid you're going to have to manually create the binary file. Meaning finding the format of a shortcut and programming it.
When you do this, you're going to be storing a string into the file. Make sure you check whether this string is Unicode (2 bytes per char) or ANSI (1 byte). I suspect the second, and VB uses the first.

As for the current path of the executable -> App.Path

Good luck... for the format, Google's your friend.

Best Regards,
Richard

Report
Re: creating a shortcut Posted by MFH on 2 Feb 2007 at 2:14 PM
This message was edited by MFH at 2007-2-2 14:24:41

: : I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
: : What should I do?
: :
: : Thanks for the help
: : There are 10 kind of people: those who understand binary code and those who don't understand it.
: :
:
: I'm affraid you're going to have to manually create the binary file. Meaning finding the format of a shortcut and programming it.
: When you do this, you're going to be storing a string into the file. Make sure you check whether this string is Unicode (2 bytes per char) or ANSI (1 byte). I suspect the second, and VB uses the first.
:
: As for the current path of the executable -> App.Path
:
: Good luck... for the format, Google's your friend.
:
: Best Regards,
: Richard
:
:
Are you sure there is no way to create it? I thought some installation programs can do it

edit: I think I found something here: http://www.windowsdevcenter.com/pub/a/windows/2004/04/13/VB_Shortcuts.html

However thanks for the help
Report
Re: creating a shortcut Posted by BitByBit_Thor on 3 Feb 2007 at 6:45 AM
: Are you sure there is no way to create it? I thought some installation programs can do it
:
: edit: I think I found something here: http://www.windowsdevcenter.com/pub/a/windows/2004/04/13/VB_Shortcuts.html
:
: However thanks for the help
:

Yeah I was affraid you mind find that.

It's the Windows Scripting Host. Fairly unpopular since almost all VB viri work because of that component. If you want it to be any bit portable, don't use it.
Just program it yourself.

Best Regards,
Richard




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.