Click here to Skip to main content
15,897,704 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 15:48
protectorChristian Graus7-Jul-07 15:48 
GeneralRe: Running an app/process withing my vb.net app Pin
y2ktheory7-Jul-07 16:20
y2ktheory7-Jul-07 16:20 
GeneralRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 16:40
protectorChristian Graus7-Jul-07 16:40 
GeneralRe: Running an app/process withing my vb.net app Pin
y2ktheory7-Jul-07 16:52
y2ktheory7-Jul-07 16:52 
GeneralRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 16:57
protectorChristian Graus7-Jul-07 16:57 
QuestionDesign time tasks for custom controls Pin
The ANZAC7-Jul-07 15:14
The ANZAC7-Jul-07 15:14 
Questionfind names in a directory Pin
sextonk7-Jul-07 11:27
sextonk7-Jul-07 11:27 
AnswerRe: find names in a directory Pin
TwoFaced7-Jul-07 15:30
TwoFaced7-Jul-07 15:30 
This is how I might go about it. Hope it gives you the right idea.
Const directoryPath As String = "C:\test"   ' The directory to look in

Dim desiredFiles As New List(Of String)     ' List of files we're looking for
With desiredFiles       ' Note I didn't use file extensions.  Change that if you'd like.
    .Add("File1")       ' but you'll need to tweak the code below if you do.
    .Add("File2")
End With

' METHOD 1

' Create a DirectoryInfo object for the desired directory
' to look in.
Dim info As New IO.DirectoryInfo(directoryPath)

' Get all the *.doc files in the directory
For Each file As IO.FileInfo In info.GetFiles("*.doc")
    ' The contains method is case sensitive.  If you want a case-insentive
    ' search you can add the desired file names in all lower or uppercase and then use the
    ' ToLower or ToUpper methods on the file name
    If desiredFiles.Contains(IO.Path.GetFileNameWithoutExtension(file.Name)) Then
        ' The file name was found in our list
        MsgBox("Directory contained file: " & file.Name)
    End If
Next

' METHOD 2
For Each file As String In desiredFiles
    If IO.File.Exists(IO.Path.Combine(directoryPath, file & ".doc")) Then
        MsgBox("Directory contained file: " & file)
    End If
Next

Questionhow to control the parallel port using visual basic? Pin
meki_21187-Jul-07 7:29
meki_21187-Jul-07 7:29 
AnswerRe: how to control the parallel port using visual basic? Pin
Luc Pattyn7-Jul-07 8:41
sitebuilderLuc Pattyn7-Jul-07 8:41 
QuestionMAPIMessages1.Fetch from a different folder Pin
EvScott7-Jul-07 7:20
EvScott7-Jul-07 7:20 
Questiondatagridview Row provided already belongs to a DataGridView control Pin
balakpn6-Jul-07 23:07
balakpn6-Jul-07 23:07 
Questiondeveloping mutiuser Application(urgent) Pin
prasadbuddhika6-Jul-07 23:01
prasadbuddhika6-Jul-07 23:01 
AnswerRe: developing mutiuser Application(urgent) Pin
Ajai Chaudhary6-Jul-07 23:17
Ajai Chaudhary6-Jul-07 23:17 
Questionprotection with CD Key Pin
Ajai Chaudhary6-Jul-07 21:10
Ajai Chaudhary6-Jul-07 21:10 
AnswerRe: protection with CD Key Pin
Paul Conrad13-Jul-07 12:32
professionalPaul Conrad13-Jul-07 12:32 
Questionhow can i import data from excel to sqlserver using vb6.0 Pin
koolprasad20036-Jul-07 21:01
professionalkoolprasad20036-Jul-07 21:01 
AnswerRe: how can i import data from excel to sqlserver using vb6.0 Pin
ips_sun6-Jul-07 21:23
ips_sun6-Jul-07 21:23 
Questionneed code to find serial number of hard, mainboard and cpu please Pin
omidreza8126-Jul-07 20:13
omidreza8126-Jul-07 20:13 
QuestionTo develop Windows applications to support an number of languages. Pin
Hari Prasad Karnam6-Jul-07 20:13
Hari Prasad Karnam6-Jul-07 20:13 
AnswerRe: To develop Windows applications to support an number of languages. Pin
Tom Deketelaere8-Jul-07 21:26
professionalTom Deketelaere8-Jul-07 21:26 
Questioncrystal report Pin
d_smit6-Jul-07 19:41
d_smit6-Jul-07 19:41 
QuestionVB.Net Sockets [modified] Pin
calebcohoon6-Jul-07 13:03
calebcohoon6-Jul-07 13:03 
AnswerRe: VB.Net Sockets Pin
MidwestLimey9-Jul-07 9:24
professionalMidwestLimey9-Jul-07 9:24 
Questionsequential files Pin
Cedrickdeorange6-Jul-07 8:08
Cedrickdeorange6-Jul-07 8: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.