[RESOLVED] Is MDI form multithread?
This is my problem to solve:
I need to download from internet various files, about 2000 per day.
I've done an app to download all this files, but it takes a lot of time to get all files because the download is done one by one, in a loop (all file names are loaded to a grid).
(:mad: My app should use all band-width, but each file doesn't have more then 100kb.:mad: )
What I want to know is, by creating multiple forms in run-time (each one to download, lets say, 10 files), do they have independent threads?
Thank you.
Re: Is MDI form multithread?
Nothing in VB is Multithread...
In order to achieve multithread you must use ActiveX exe's
Re: Is MDI form multithread?
Can you give me a tip on it?
Thank you.
Re: Is MDI form multithread?
That was a tip... What are you thinking of???
Re: Is MDI form multithread?
Create an ActiveX exe to do just the downloading. That way you can have as many threads as you need.
Re: Is MDI form multithread?
Ok, but how do I execute an activeX exe?
I need a tip on this!
Re: Is MDI form multithread?
Good answers require good questions...
Use ShellExecute API
Re: Is MDI form multithread?
could you give me an explicit example on how to use ShellExecute with an ActiveX exe?
(is (ShellExecute<>Shell) ?)
Thank you.
Re: Is MDI form multithread?
You use it the same way as with a regular exe...
You could also instantiate it the same way you would a dll, if you needed to communicate with it (or it you).
Please when asking question type out the whole question (is (ShellExecute<>Shell) ?) doesn't mean much to me in English...
Re: Is MDI form multithread?
Ok. So, to use an ActiveX EXE do I will need to create a new VB project?
Are "ShellExecute" and "Shell" different commands?
If you say that I can use a activeX EXE as a regular EXE, why my ActiveX EXE doesn't show my form?
My StartUp object is "Sub Main"
Code:
'module code
Option Explicit
Public Sub Main()
Dim frm As New Form1
frm.Show
End Sub
Re: Is MDI form multithread?
Try creating the ActiveX exe then setting a reference to it in your app the same way you would a dll.