Results 1 to 15 of 15

Thread: PLZ HELP ME WITH Multithreading

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    182

    Arrow PLZ HELP ME WITH Multithreading

    Im going crazy with this i dont understand at all invokeee i want to run 2 subs at the same time when i click a button check 1 and check 2 are 2 subs when i click a button it calls sub pi which then calls the 2 forms but idk how.. this is the code for callin the 2 subs i want together to run
    vb.net Code:
    1. Public Sub pi()
    2. Dim thrMyThread As New System.Threading.Thread(AddressOf check2)
    3.         thrMyThread.Start()
    4.  
    5.         Dim thrMyThread1 As New System.Threading.Thread(AddressOf check1)
    6.         thrMyThread1.Start()End Sub
    7.  
    8. Private Sub check2()
    9. textbox1.text="12"
    10. end sub
    11.  
    12. Private Sub check1()
    13. textbox2.text="14"
    14. end sub


    i figure it out, i just want to know if im doing it right...cuz apparently both are running at the same time..

    this is the new part in the code

    Code:
    Dim thrMyThread As New System.Threading.Thread(AddressOf check2)
            thrMyThread.Start()
    
            Dim thrMyThread1 As New System.Threading.Thread(AddressOf check1)
            thrMyThread1.Start()End Sub
    Last edited by justme369; Jun 17th, 2010 at 10:16 AM. Reason: i figure it out, i just want to know if im doing it right...cuz apparently both are running at the same time

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