|
Imports System.Text
Imports lightbox.tool
Public Class Form1
' ******************************************************
' 戻り値で返す
' ******************************************************
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim dir As New LboxCommdlg("c:\tmp", "テスト")
Dim path As String
path = dir.GetFolderName2()
If path <> "" Then
MessageBox.Show(path)
End If
End Sub
' ******************************************************
' 引数で返す
' ******************************************************
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Dim dir As New LboxCommdlg("c:\tmp", "テスト")
Dim path As New StringBuilder(1024)
If dir.GetFolderName(path) Then
MessageBox.Show(path.ToString())
End If
End Sub
' ******************************************************
' プロパティで返す
' ******************************************************
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click
Dim dir As New LboxCommdlg("c:\tmp", "テスト")
If dir.GetFolderName() Then
MessageBox.Show(dir.SelectedPath)
End If
End Sub
End Class
| |