Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OpenDirDialog ???
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00652742
Message ID:
00653072
Views:
24
Hi Benoit,

The source of GetDir() is also a part of the library. Here is the extract from the Toolkit for implementing GetDir().
[Note: GetDir() was a tricky one because it is not implemented as a part of the .NET Framework classes]

Hope this helps,
Kamal
Imports System.Design
Imports System.Windows.Forms.Design

Public Class dialogs
	'<example>
	'Dim MyDir As String
	'MyDir = GetDir()
	'If Not Empty(MyDir) Then
	'   'Do something
	'End If
	'</example>
	Public Shared Function GetDir() As String
	    Return GetDir("")
	End Function

	Public Shared Function GetDir(ByVal tcTitle As String) As String
	    'The GetDirBrowser is a class developed in VFPToolkitNET and is not a
	    'built in .NET Framework class
	    Dim db As GetDirBrowser = New GetDirBrowser()
	    Return db.ShowIt(tcTitle)
	End Function

	' A special treatement for the GetDir() as it was not a built 
	' in as a .NET Framework class
	Private Class GetDirBrowser
	    Inherits FolderNameEditor
	    ' inherit the FolderNameEditor class
	    Dim fBrowser As FolderNameEditor.FolderBrowser

	    Public Sub New()
		' contructor
		' create an instance of FolderBrowser
		fBrowser = New System.Windows.Forms.Design.FolderNameEditor.FolderBrowser()
	    End Sub

	    Public Function ShowIt(ByVal textdescription As String) As String
		' set the Description label		
		fBrowser.Description = textdescription
		fBrowser.ShowDialog() ' show the Windows 
		Return fBrowser.DirectoryPath ' return whatever path choosen
	    End Function

	End Class
End Class
>Thank you Kamal,
>
>The library seems very usefull ! But now, I'm learning VB.NET and I'd prefer, for the moment, to code my functions myself. Maybe later I will use some library from others. Now it's only for learning purpose...
>
>So does anybody have any tips on any getdir() like function buit-in .net framework ? Do I have to make it from scratch ? What classes or objects do I use to manage drives, files, and directories ?
>
>
>Thanks again, and in advance !!
>
>Regards
Previous
Reply
Map
View

Click here to load this message in the networking platform