Attribute VB_Name = "OTSTDLIB_ShellExec" Option Explicit '============================================================ ' OT Standard Library: Visual Basic ' ShellExec.bas ' Description: Used to allow programs to properly launch ' programs with their associated file types ' as well as with better accuracy ' Return Type: Long // Not like ShellOpen's String Type '------------------------------------------------------------ '------------------------------------------------------------ ' Example of How to Call Function ' ------------------------------- ' ' +----------------------------------------------------------+ ' | This code block opens a web page in the default web | ' | browser - this also works with mailto: and program files | ' +----------------------------------------------------------+ ' ' Dim iret As Long ' iret = ShellExecute(Me.hWnd, _ ' vbNullString, _ ' "http://ottech.cjb.net/wbrowser/index.html", _ ' vbNullString, _ ' "c:\", _ ' SW_SHOWNORMAL) '============================================================ Public Declare Function ShellExecute Lib _ "shell32.dll" Alias "ShellExecuteA" _ (ByVal hWnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Public Const SW_SHOWNORMAL = 1