'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB
'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB 6 'Run file in NT or Win95/98 with
API Declarations
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Function SHRunDialog Lib "shell32" Alias "#61" (ByVal hOwner As Long, ByVal Unknown1 As Long, ByVal Unknown2 As Long, ByVal szTitle As String, ByVal szPrompt As String, ByVal uFlags As Long) As Long
Rate 'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB
(2(2 Vote))
Dim sTitle As String, sPrompt As String
sTitle = "Run a program Title..."
sPrompt = "Type the name of a program ..."
If IsWinNT Then
SHRunDialog Me.hWnd, 0, 0, StrConv(sTitle, vbUnicode), StrConv(sPrompt, vbUnicode), 0
Else
SHRunDialog Me.hWnd, 0, 0, sTitle, sPrompt, 0
End If
End Sub
Function isWinNT() As Boolean
Dim OSInfo As OSVERSIONINFO
OSInfo.dwOSVersionInfoSize = Len(OSInfo)
Ret& = GetVersionEx(OSInfo)
IsWinNT = (OSInfo.dwPlatformId = 2)
End Function
'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB Comments
No comments yet — be the first to post one!
Post a Comment