Results 1 to 11 of 11

Thread: [RESOLVED] Is MDI form multithread?

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Resolved [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).

    ( My app should use all band-width, but each file doesn't have more then 100kb. )

    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.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Is MDI form multithread?

    Nothing in VB is Multithread...

    In order to achieve multithread you must use ActiveX exe's

  3. #3

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Is MDI form multithread?

    Can you give me a tip on it?

    Thank you.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Is MDI form multithread?

    That was a tip... What are you thinking of???
    Last edited by randem; Aug 23rd, 2007 at 05:32 AM.

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  6. #6

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Is MDI form multithread?

    Ok, but how do I execute an activeX exe?
    I need a tip on this!

  7. #7
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Is MDI form multithread?

    Good answers require good questions...

    Use ShellExecute API

  8. #8

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    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.

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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...

  10. #10

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    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

  11. #11
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width