home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Unleashed
/
Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso
/
source
/
chap22
/
getdir.frm
< prev
next >
Wrap
Text File
|
1995-09-24
|
2KB
|
56 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 8460
ClientLeft = 1140
ClientTop = 1515
ClientWidth = 6690
Height = 8865
Left = 1080
LinkTopic = "Form1"
ScaleHeight = 8460
ScaleWidth = 6690
Top = 1170
Width = 6810
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Declare Function GetCurrentDirectory Lib "kernel32" _
Alias "GetCurrentDirectoryA" (ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long
Private Declare Function GetSystemDirectory Lib "kernel32" _
Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Private Declare Function GetTempPath Lib "kernel32" _
Alias "GetTempPathA" (ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Private Sub Form_Load()
Dim curDir As String
Dim sysDir As String
Dim tmpDir As String
Dim winDir As String
curDir = Space(500)
sysDir = Space(500)
tmpDir = Space(500)
winDir = Space(500)
curDir = Left(curDir, GetCurrentDirectory(Len(curDir), curDir))
sysDir = Left(sysDir, GetSystemDirectory(sysDir, Len(sysDir)))
tmpDir = Left(tmpDir, GetTempPath(Len(tmpDir), tmpDir))
winDir = Left(winDir, GetWindowsDirectory(winDir, Len(winDir)))
MsgBox curDir
MsgBox sysDir
MsgBox tmpDir
MsgBox winDir
End Sub