V닉맨
2014.02.09 01:07:58
*: Imports System.Collections
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
With FolderBrowserDialog1
.Reset()
.Description = "선택하세요"
.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
.ShowNewFolderButton = True
Dim ret As DialogResult = .ShowDialog
If ret = Windows.Forms.DialogResult.OK Then
Dim nfiles As ObjectModel.ReadOnlyCollection(Of String)
nfiles = My.Computer.FileSystem.GetFiles(.SelectedPath)
MsgBox("폴더안의 파일갯수는 : " & nfiles.Count, MsgBoxStyle.Information)
End If
.Dispose()
End With
Catch ex As Exception