By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

FileFind - Multithread

P: n/a
I have a a program in vb6 which looks for a file in a folder structure
including subfolders, the folders could be more than 100 folders.
Once a particular file is found i start another instance of the program i.e.
via Shell which continues searching. The original instance then starts to
process the file and once done exits.
so basically you have a scenario where there is always an instance of the
program looking for a file.

Now due to the lack of multithreading in VB6 i was wondering wether it would
be a good step to undertake if i re-developed this in vb.net where the
processing file bit could just be another thread instead of calling another
instance of the program.

Is this possible and if so any pointers in how to go about it due to me
having very little knowledge of vb.net.

many thanks


Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi N.Naeem,

I think it can be done and is very easy.

In net you have fileclasses as DirectoryInfo and FileInfo

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...classtopic.asp

And this I think is almost all you need for your multithreading

http://support.microsoft.com/default...b;en-us;316136

I hope this helps?

Cor
Nov 20 '05 #2

P: n/a
* "N.Naeem" <nn****@REMTHISportech.co.uk> scripsit:
I have a a program in vb6 which looks for a file in a folder structure
including subfolders, the folders could be more than 100 folders.
Once a particular file is found i start another instance of the program i.e.
via Shell which continues searching. The original instance then starts to
process the file and once done exits.
so basically you have a scenario where there is always an instance of the
program looking for a file.

Now due to the lack of multithreading in VB6 i was wondering wether it would
be a good step to undertake if i re-developed this in vb.net where the
processing file bit could just be another thread instead of calling another
instance of the program.

Is this possible and if so any pointers in how to go about it due to me
having very little knowledge of vb.net.


What you want to do should be possible with multithreading.

Some links:

Multithreading + Windows Forms:

<URL:http://www.devx.com/dotnet/Article/11358/>

<URL:http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassInvokeTopic.asp >

Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconthreadinginvisualbasic.asp>

Sample in C#:

<URL:http://www.palmbytes.de/content/dotnet/filesearchlib.htm>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.