Option Explicit
'Common Dialog
Private Type OPENFILENAME
lStructSize As Long
hWndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Public Const OFN_READONLY = &H1
Public Const OFN_OVERWRITEPROMPT = &H2
Public Const OFN_HIDEREADONLY = &H4
Public Const OFN_NOCHANGEDIR = &H8
Public Const OFN_SHOWHELP = &H10
Public Const OFN_ENABLEHOOK = &H20
Public Const OFN_ENABLETEMPLATE = &H40
Public Const OFN_ENABLETEMPLATEHANDLE = &H80
Public Const OFN_NOVALIDATE = &H100
Public Const OFN_ALLOWMULTISELECT = &H200
Public Const OFN_EXTENSIONDIFFERENT = &H400
Public Const OFN_PATHMUSTEXIST = &H800
Public Const OFN_FILEMUSTEXIST = &H1000
Public Const OFN_CREATEPROMPT = &H2000
Public Const OFN_SHAREAWARE = &H4000
Public Const OFN_NOREADONLYRETURN = &H8000
Public Const OFN_NOTESTFILECREATE = &H10000
Public Const OFN_NONETWORKBUTTON = &H20000
Public Const OFN_NOLONGNAMES = &H40000 ' force no long names for 4.x modules
Public Const OFN_EXPLORER = &H80000 ' new look commdlg
Public Const OFN_NODEREFERENCELINKS = &H100000
Public Const OFN_LONGNAMES = &H200000 ' force long names for 3.x modules
Public Const OFN_SHAREFALLTHROUGH = 2
Public Const OFN_SHARENOWARN = 1
Public Const OFN_SHAREWARN = 0
Private Declare Function GetOpenFileName Lib "COMDLG32.DLL" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Private Declare Function GetSaveFileName Lib "COMDLG32.DLL" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
'Browse Folder Declarations
Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type
Private Const BIF_RETURNONLYFSDIRS = 1
Private Const MAX_PATH = 260
Public Const BIF_STATUSTEXT = &H4&
Public Const BIF_DONTGOBELOWDOMAIN = 2
Public Const WM_USER = &H400
Public Const BFFM_INITIALIZED = 1
Public Const BFFM_SELCHANGED = 2
Public Const BFFM_SETSTATUSTEXT = (WM_USER + 100)
Public Const BFFM_SETSELECTION = (WM_USER + 102)
Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
Function OpenDialog(Form1 As Form, Filter As String, Title As String, InitDir As String) As String
Dim ofn As OPENFILENAME
Dim A As Long
Dim theTemp As String
ofn.lStructSize = Len(ofn)
ofn.hWndOwner = Form1.hwnd
ofn.hInstance = App.hInstance
If Right$(Filter, 1) <> "|" Then Filter = Filter + "|"
For A = 1 To Len(Filter)
If Mid$(Filter, A, 1) = "|" Then Mid$(Filter, A, 1) = Chr$(0)
Next
ofn.lpstrFilter = Filter
ofn.lpstrFile = Space$(254)
ofn.nMaxFile = 255
ofn.lpstrFileTitle = Space$(254)
ofn.nMaxFileTitle = 255
ofn.lpstrInitialDir = InitDir
ofn.lpstrTitle = Title
ofn.Flags = OFN_HIDEREADONLY Or OFN_FILEMUSTEXIST
A = GetOpenFileName(ofn)
If (A) Then
theTemp = Trim$(ofn.lpstrFile)
If Asc(Right$(theTemp, 1)) = 0 Then theTemp = Left$(theTemp, Len(theTemp) - 1)
OpenDialog = theTemp
Else
OpenDialog = ""
End If
End Function
Public Function BrowseForFolder(hWndOwner As Long, sPrompt As String) As String
'**************************************
' Name: Win95DirectoryPrompt
' Description:Prompting the User for a D
' irectory in Win95. Windows' common dialo
' gs are great if you want the user to sel
' ect a file, but what if you want them to
' select a directory? Call the following f
' unction, which relies on Win32's new SHB
' rowseForFolder function:
' By: Found on the World Wide Web
Dim iNull As Integer
Dim lpIDList As Long
Dim lResult As Long
Dim sPath As String
Dim udtBI As BrowseInfo
With udtBI
.hWndOwner = hWndOwner
.lpszTitle = lstrcat(sPrompt, "")
.ulFlags = BIF_RETURNONLYFSDIRS
End With
lpIDList = SHBrowseForFolder(udtBI)
If lpIDList Then
sPath = String$(MAX_PATH, 0)
lResult = SHGetPathFromIDList(lpIDList, sPath)
Call CoTaskMemFree(lpIDList)
iNull = InStr(sPath, vbNullChar)
If iNull Then
sPath = Left$(sPath, iNull - 1)
End If
End If
If InStr(LCase$(sPath), "\nethood") > 0 Then
MsgBox "The item that you selected is a folder shortcut, not a folder.", vbCritical, "Browse Folders"
BrowseForFolder = ""
Else
BrowseForFolder = sPath
End If
End Function
TEST
Total Tayangan Halaman
Footer Right
Label
aku bukan orang yang berpendidikan yang tinggi,, namun aku mempunyai cita cita yang sangat tinggi.....
About
link friends
Categories
- ++-=dNt|F|uNiversaL*=-++ (1)
- Atlantica (2)
- Ayodance (3)
- Cheat Game Lyto (2)
- face (1)
- facebookerz (49)
- Freestyle (1)
- Hacking/Cracking (26)
- Handphone and Smartphone (11)
- Internet Website and Webmaster (14)
- Music downlaod (1)
- Only s40 Tricks (6)
- Point BLank (77)
- Software (16)
- Visual Basic 6 (15)
- X-SHOOT (5)
Pages
Diberdayakan oleh Blogger.
Followers
Blog Archive
-
▼
2010
(60)
-
▼
November
(37)
- ModBrowser
- ModCDialog
- ModInjector
- ModProcess
- source injectot Part 1
- CHI INJECTOR
- DOTZ UPDATE MAPHACK ONLY
- Gdr V 1.0 Alt-Tab + MasMed + Spion Mode + Map Hack
- Rpe
- [Trainner] Benzkiller-3Beta1
- V1.2 X-Lonz
- Full Map Hack n Special Map Giran
- Heroin v3 Map Hack
- Mbakmini
- lelboXz Repack
- ANDroid v1.0
- system V.1 21 November Credit by ME
- ThreeHacker Special V2
- ASSEYKA V.16.9 Release 16 November 2010 Speed Hack...
- Rpe new
- SM Trainer
- PRD V10.zip
- UPDATE Offset+Hotkey Zenix yg kemarin..
- MKZ_Stret_v2.1
- New Cheat Masmed
- Yg butuh *pE
- ALLJAZ V4 101110
- Fitur MesMed : ALT+TAB,, reset Card, cwe Robot tro...
- auto exp *Ep
- Rinocom V.1.7
- Nh Masmed , Wallshoot , aLT+TAB ane dapet dari for...
- UNHOLYROBBY UNDERATTACK V2.5
- X-Lonz_Repack UpDate 04-11-2010
- ™WhItE_V.1.8™
- HOTKEY : f5 : MINIMAZE on f6 :MINIMAZE off F9 ...
- X-LoNz_Repack 1 November
- cheat terbaru 100% work no ccd
-
▼
November
(37)
SAMPLE
»
Visual Basic 6
» ModCDialog
Silahkan Tulis Komentar Anda ...