README.md

December 4, 2022 ยท View on GitHub

Launch any file!

Description

With this little function you can LAUNCH ANY TYPE OF FILE that windows reconizes. This means that you can open any type of file that windows has the application for it. For example: You can run a file named "movie.rm" (RealPlayer fomat), but if you don't have Real Player installed, the function just won't do anything! No bugs at all!

More Info

Submitted On
ByYossi R
LevelBeginner
User Rating5.0 (15 globes from 3 users)
CompatibilityVB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryFiles/ File Controls/ Input/ Output
WorldVisual Basic
Archive File

API Declarations

Private 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

Source Code

Public Function Win32Keyword(ByVal URL As String) As Long
weburl = ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
End Function
'For example: put the next code under a commad button:
Private Sub Command1_Click()
win32keyword("C:\bla\bla\movie.rm")
End Sub