Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. threading in VB6..

threading in VB6..

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jainiraj
    wrote on last edited by
    #1

    I am new in Thread and want to use two functions in diff. thread. My functions are- sendData() and sendInfo() How can i start that these two functions call in diff. thread and can run at same time. Plz explain in detail.. Thanks in adv..

    D L 2 Replies Last reply
    0
    • J jainiraj

      I am new in Thread and want to use two functions in diff. thread. My functions are- sendData() and sendInfo() How can i start that these two functions call in diff. thread and can run at same time. Plz explain in detail.. Thanks in adv..

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      VB6 doesn't support threading. There are work arounds to do this, but you better know what you're doing and why. Also, the debugger does not support debugging multithreaded code. Try it and you'll crash the IDE. If you really want to do threading, drop VB6 and pickup VB.NET.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      • J jainiraj

        I am new in Thread and want to use two functions in diff. thread. My functions are- sendData() and sendInfo() How can i start that these two functions call in diff. thread and can run at same time. Plz explain in detail.. Thanks in adv..

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        As Dave already mentioned, you don't want to call CreateThread from VB6. You can find example-implementations on the internet, but most aren't complete and it seldom a good idea. For an in-depth explanation, check this[^] article. There are some alternatives, like encapsulating your thread in a complete executable. The best option to add multithreading to an existing VB6 application, is by using VB.NET; you can use the InterOp Toolkit[^] to extend your VB6 application with VB.NET specific code. You could create a new form in VB.NET, add as much threading as you like, and load that form from VB6. If it's a new project then you'd best move on to VB.NET.

        I are Troll :suss:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups