ERFORDERLICHE
OBJEKTE
1 CommandButton (Command1)
FORM-CODE
Private Declare Function GetSystemDirectory Lib "KERNEL32" _
Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Private Function WinSysDir() As String
Dim sDirBuf As String * 255
StrLen = GetSystemDirectory(sDirBuf, 255)
WinSysDir = Left$(sDirBuf, StrLen)
End Function
Private Sub Command1_Click()
MsgBox "Das Windows-System-Verzeichnis lautet " & _
WinSysDir(), vbInformation
End Sub
|