大文字のパスを小文字に変換 <TOP>
PathMakePretty 大文字のパスを小文字に変換
'================================================================ '= 大文字のパスを小文字に変換 '= (PathMakePretty.bas) '================================================================ #include "Windows.bi" ' 大文字のパスを小文字に変換 Declare Function Api_PathMakePretty& Lib "shlwapi" Alias "PathMakePrettyA" (ByVal pszPath$) Var Shared Edit1 As Object Var Shared Text1 As Object Var Shared Button1 As Object Edit1.Attach GetDlgItem("Edit1") : Edit1.SetFontSize 14 Text1.Attach GetDlgItem("Text1") : Text1.SetFontSize 14 Button1.Attach GetDlgItem("Button1") : Button1.SetFontSize 14 '================================================================ '= '================================================================ Declare Sub MainForm_Start edecl () Sub MainForm_Start() Edit1.SetWindowText "C:\THE DIR\MYFILE\" End Sub '================================================================ '= '================================================================ Declare Sub Button1_on edecl () Sub Button1_on() Var sSave As String Var Ret As Long sSave = Edit1.GetWindowText Ret = Api_PathMakePretty(sSave) Text1.SetWindowText sSave End Sub '================================================================ '= '================================================================ While 1 WaitEvent Wend Stop End