VB Tips Vol.51
Windows フォルダの取得


Option Explicit
Private Declare Function GetWindowsDirectory Lib "Kernel32.dll" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Private Sub Form_Load()
Dim path As String * 255
Dim
pathlen As Long

pathlen = GetWindowsDirectory(path, Len(path))
Label1.Caption = "Widows フォルダ:" & path
End Sub

サンプルプログラムのダウンロード(4.80KB)
※このページの内容とサンプルプログラムのコードは多少異なる場合があります。


戻る ホーム