Click here to Skip to main content
16,006,006 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can I pop up a window in VB.net? Pin
just3ala231-Oct-06 22:49
just3ala231-Oct-06 22:49 
GeneralRe: How can I pop up a window in VB.net? Pin
walalawll31-Oct-06 23:01
walalawll31-Oct-06 23:01 
GeneralRe: How can I pop up a window in VB.net? Pin
just3ala21-Nov-06 0:30
just3ala21-Nov-06 0:30 
GeneralRe: How can I pop up a window in VB.net? Pin
walalawll1-Nov-06 13:47
walalawll1-Nov-06 13:47 
GeneralRe: How can I pop up a window in VB.net? Pin
just3ala21-Nov-06 20:21
just3ala21-Nov-06 20:21 
AnswerRe: How can I pop up a window in VB.net? Pin
OldWarhorse2-Nov-06 2:19
OldWarhorse2-Nov-06 2:19 
QuestionFile Search Pin
Xmen Real 31-Oct-06 21:40
professional Xmen Real 31-Oct-06 21:40 
AnswerRe: File Search Pin
nlarson111-Nov-06 6:21
nlarson111-Nov-06 6:21 
It's not peppy code if you need to look at the entire harddrive but this will get you through it if you know where to start.

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If bFindFile("C:\", "abcd.txt") Then
MsgBox("Yep") 'show form1
Else
MsgBox("Nope") 'show form2
End If
End Sub

Private Function bFindFile(ByVal sStartFolder As String, ByVal sFileName As String) As Boolean
Dim bFound As Boolean = False

GetDirectories(sStartFolder, sFileName, bFound)

Return bFound
End Function

Private Sub GetDirectories(ByVal sPath As String, ByVal sFileName As String, ByRef bFound As Boolean)
For Each sDir As String In Directory.GetDirectories(sPath)
bFound = bCheckFiles(sDir, sFileName)
If bFound Then Exit Sub 'we found it...get out of the loop

GetDirectories(sDir, sFileName, bfound)
If bFound Then Exit Sub 'we found it...get out of the loop
Next
End Sub

Private Function bCheckFiles(ByVal sPath As String, ByVal sFileName As String) As Boolean
Dim saFiles() As String = Directory.GetFiles(sPath)

sFileName = sFileName.ToLower

For Each sFile As String In saFiles
If Mid(sFile, InStrRev(sFile, "\") + 1).ToLower = sFileName Then Return True
Next

System.Windows.Forms.Application.DoEvents() 'so your PC does not lock up looking for the file
Return False
End Function

GeneralRe: File Search Pin
Xmen Real 1-Nov-06 23:28
professional Xmen Real 1-Nov-06 23:28 
QuestionInstallShield Project Compilation,Plz......Help Pin
Jeeva Mary Varghese31-Oct-06 18:25
Jeeva Mary Varghese31-Oct-06 18:25 
AnswerRe: InstallShield Project Compilation,Plz......Help Pin
ChandraRam1-Nov-06 0:01
ChandraRam1-Nov-06 0:01 
GeneralRe: InstallShield Project Compilation,Plz......Help Pin
Jeeva Mary Varghese1-Nov-06 0:15
Jeeva Mary Varghese1-Nov-06 0:15 
Questionexcel and word Pin
Sebastian T Xavier31-Oct-06 17:44
Sebastian T Xavier31-Oct-06 17:44 
AnswerRe: excel and word Pin
PavanPareta31-Oct-06 21:31
PavanPareta31-Oct-06 21:31 
Questionhow to convert html file in doc file with same format. Pin
PavanPareta31-Oct-06 17:19
PavanPareta31-Oct-06 17:19 
QuestionDate and Time Pin
steve_rm31-Oct-06 16:19
steve_rm31-Oct-06 16:19 
AnswerRe: Date and Time Pin
Janani Divya31-Oct-06 17:05
Janani Divya31-Oct-06 17:05 
AnswerRe: Date and Time Pin
Guffa31-Oct-06 20:15
Guffa31-Oct-06 20:15 
Questionhow to change the datagrid column based on an adjacent column's true or false Pin
Durgamalli31-Oct-06 16:17
Durgamalli31-Oct-06 16:17 
AnswerRe: how to change the datagrid column based on an adjacent column's true or false Pin
nlarson111-Nov-06 6:50
nlarson111-Nov-06 6:50 
QuestionEvent Pin
Socheat.Net31-Oct-06 16:01
Socheat.Net31-Oct-06 16:01 
AnswerRe: Event Pin
Alex Feature31-Oct-06 19:31
Alex Feature31-Oct-06 19:31 
GeneralRe: Event Pin
Socheat.Net3-Nov-06 15:38
Socheat.Net3-Nov-06 15:38 
QuestionCrystalReports in vb.net: How to change SqlSelectCmd used for a report Pin
mp000131-Oct-06 14:18
mp000131-Oct-06 14:18 
QuestionFormating strings in VB6 Pin
No-e31-Oct-06 10:08
No-e31-Oct-06 10:08 

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.