Click here to Skip to main content
15,908,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralOptional parameters cannot have structure types Pin
Charles Sicotte16-Jun-05 5:30
Charles Sicotte16-Jun-05 5:30 
GeneralRe: Optional parameters cannot have structure types Pin
Dave Kreskowiak16-Jun-05 7:43
mveDave Kreskowiak16-Jun-05 7:43 
GeneralRe: Optional parameters cannot have structure types Pin
Charles Sicotte16-Jun-05 8:52
Charles Sicotte16-Jun-05 8:52 
GeneralEdit text in TreeView Pin
seee sharp16-Jun-05 5:24
seee sharp16-Jun-05 5:24 
GeneralRe: Edit text in TreeView Pin
Anonymous16-Jun-05 8:12
Anonymous16-Jun-05 8:12 
GeneralEdit text in TreeView Pin
seee sharp16-Jun-05 5:24
seee sharp16-Jun-05 5:24 
Generalfile finder Pin
JimClark6816-Jun-05 4:45
JimClark6816-Jun-05 4:45 
GeneralRe: file finder Pin
Anonymous16-Jun-05 7:44
Anonymous16-Jun-05 7:44 
Imports System.IO

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 56)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.TextBox1.Size = New System.Drawing.Size(568, 192)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "TextBox1"
Me.TextBox1.WordWrap = False
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(24, 16)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(96, 24)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Search"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(600, 266)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Clear()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
Dim result As ArrayList = FindFiles.FindFiles("c:\", "*.jpg")
For i = 1 To result.Count - 1
TextBox1.AppendText(result.Item(i).ToString & vbCrLf)
Next
End Sub
End Class
Public Class FindFiles

Public Shared Function FindFiles(ByVal basePath As String, ByVal searchPattern As String) As ArrayList
Dim result As New ArrayList

For Each dir As String In Directory.GetDirectories(basePath)
result.AddRange(FindFiles(dir, searchPattern))
Next

For Each file As String In Directory.GetFiles(basePath, searchPattern)
result.Add(file)
Next

Return result

End Function


End Class

GeneralRe: file finder Pin
JimClark6817-Jun-05 7:24
JimClark6817-Jun-05 7:24 
GeneralCompiling VB.NET Code at runtime Pin
Sumit Domyan16-Jun-05 2:32
Sumit Domyan16-Jun-05 2:32 
GeneralRe: Compiling VB.NET Code at runtime Pin
Dave Kreskowiak16-Jun-05 4:19
mveDave Kreskowiak16-Jun-05 4:19 
GeneralRe: Compiling VB.NET Code at runtime Pin
jonathan1517-Jun-05 0:56
jonathan1517-Jun-05 0:56 
GeneralRe: Compiling VB.NET Code at runtime Pin
Sumit Domyan17-Jun-05 1:00
Sumit Domyan17-Jun-05 1:00 
GeneralVBA question: Putting ByteArray into an XML doc Pin
pankajdaga16-Jun-05 1:12
pankajdaga16-Jun-05 1:12 
GeneralRe: VBA question: Putting ByteArray into an XML doc Pin
Dave Kreskowiak16-Jun-05 4:10
mveDave Kreskowiak16-Jun-05 4:10 
GeneralWireless Card and AP Pin
Member 204556016-Jun-05 0:22
Member 204556016-Jun-05 0:22 
GeneralRe: Wireless Card and AP Pin
Dave Kreskowiak16-Jun-05 4:06
mveDave Kreskowiak16-Jun-05 4:06 
Generaltrying to catch messages in VB6 Pin
15-Jun-05 23:00
suss15-Jun-05 23:00 
GeneralRe: trying to catch messages in VB6 Pin
Dave Kreskowiak16-Jun-05 4:03
mveDave Kreskowiak16-Jun-05 4:03 
GeneralVS 2005 Beta Pin
broadbent15-Jun-05 22:22
broadbent15-Jun-05 22:22 
GeneralRe: VS 2005 Beta Pin
Jim Matthews16-Jun-05 2:54
Jim Matthews16-Jun-05 2:54 
GeneralNeed help Pin
Nguyen Dinh Quy15-Jun-05 21:41
Nguyen Dinh Quy15-Jun-05 21:41 
GeneralRe: Need help Pin
lata07mahi16-Jun-05 0:49
lata07mahi16-Jun-05 0:49 
GeneralHELP!! updating datagrid Pin
15-Jun-05 20:47
suss15-Jun-05 20:47 
Generalftp Pin
ADY00715-Jun-05 11:02
ADY00715-Jun-05 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.