by Yenidogan Adem (1 Submission)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 9th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
'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
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
No comments have been posted about 'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB. Why not be the first to post a comment about 'Author: Yenidogan 'Author's email: [email protected] 'Date Submitted: 07/09/2003 'Compatibility: VB.