Results 1 to 8 of 8

Thread: Error When Using MultiThreading in vb6

  1. #1

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Arrow Error When Using MultiThreading in vb6

    Hello Guys

    when i use MultiThreading in vb6 shows me this error and after that project is closed . The file in Attachments



    Thanks For All
    Attached Files Attached Files
    الحمد لله

  2. #2
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Error When Using MultiThreading in vb6

    Sniper

    Does that happen each time you close the project?

    I have no experience with MultiThreading, but I have
    encountered that dreaded message periodically while
    editting an app in break mode. My changes are lost, and
    the project gets closed out.

    The "solution" is to reopen the project, try to reconstruct
    my changes, SAVE them (!!), and then re-run the app.

    Were you making changes?

    Spoo

  3. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Error When Using MultiThreading in vb6

    VB6 doesn't support multi-threading.

  4. #4
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Error When Using MultiThreading in vb6

    Here is an example of MultiThreading:
    http://www.vbforums.com/showthread.php?t=511995

  5. #5

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Arrow Re: Error When Using MultiThreading in vb6

    Quote Originally Posted by Spoo View Post
    Sniper

    Does that happen each time you close the project?

    I have no experience with MultiThreading, but I have
    encountered that dreaded message periodically while
    editting an app in break mode. My changes are lost, and
    the project gets closed out.

    The "solution" is to reopen the project, try to reconstruct
    my changes, SAVE them (!!), and then re-run the app.

    Were you making changes?

    Spoo
    yes that happen each time
    الحمد لله

  6. #6

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Arrow Re: Error When Using MultiThreading in vb6

    Quote Originally Posted by Doogle View Post
    VB6 doesn't support multi-threading.
    why not
    الحمد لله

  7. #7

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Arrow Re: Error When Using MultiThreading in vb6

    Quote Originally Posted by CVMichael View Post
    Here is an example of MultiThreading:
    http://www.vbforums.com/showthread.php?t=511995
    i will try it
    الحمد لله

  8. #8
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Error When Using MultiThreading in vb6

    Quote Originally Posted by SNIPER.PS View Post
    why not
    As far as I understand....

    VB 6 apartment threaded objects and programs are limited to execution in a Single Threaded Apartment (STA). Even if you use an out of process object (COM object in an exe) you will only get two threads (the one for your calling program and one for the COM exe) and each of them will be in an STA.

    The reason for this is to allow VB 6 objects to be thread safe (safe to call from true multithreaded applications written in other languages).

    VB.NET, however, supports an additional threading model, the Free Threading Model, which forces an object to execute in a Multi Threaded Apartment (MTA), this threading model allows multiple concurrent threads of execution.

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