AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

Creating Internet Shortcuts

A great way of advertising your site is to offer a link from the desktop or Start Menu to your site.  To do this, you create a URL file.  When this file is double-clicked, it opens up the default browser with the Web Site stored in the file. The structure of the file is as follows.

URL File Structure

A URL file has the extension .URL, and contains the following text:

[InternetShortcut]
URL=http://www.websiteaddress.com          

A Internet Shortcut file that points towards Allapi.net would have the format:

[InternetShortcut]
URL=../          

Code

The following code creates a Internet Shortcut on the desktop.

'declare variables
Dim StrURLFile As String
Dim StrURLTarget As String
Dim FileNum As Integer

'initialise Variables
StrURLFile = "C:\Windows\Desktop\KPDHome.url"
StrURLTarget = "../"
FileNum = FreeFile

'Write the Internet Shortcut file
Open StrURLFile For Output As FileNum
Print #FileNum, "[InternetShortcut]"
Print #FileNum, "URL=" & StrURLTarget
Close FileNum

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/