Source Code VB 6.0 Run Dialog


Dibawah ini adalah source code vb 6.0 untuk menampilkan run dialog.

program ini adalah run alternatif jika run didisable akibat virus.

  • buka program vb 6.0
  • buat satu form, kemudian copy-paste source code dibawah

Const shrdNoMRUString = &H2
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
Private Sub Form_Load()
Dim sTitle As String, sPrompt As String
sTitle = “Jalankan Program …”
sPrompt = “Ketik nama sebuah 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

  • save project, kemudian di run

–Selamat Mencoba–

Iklan

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s