Results 1 to 2 of 2

Thread: problem closing problem...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    problem closing problem...

    when stooping my program, the program continues to run, its a threading problem , i dont know what to do , this is how the program looks like >>

    public sub main

    StartSocketThread()
    dim a as new form1
    dim b as new form2
    a.show
    application.run(b)
    a.close


    end sub


    public sub StartSocketThread()
    dim thread as new thread ( addressof start)
    thread.isbackground=true
    thread.start
    end sub


    public sub start()

    'some code

    ' the problem is here, the loop is to keep the thread alive, but dont know how to close it ( i thought it would work when set to background thread )
    do
    loop

    end sub

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    "SOLVED"

    i didnt need the Do...Loop thing, i have an object created above it and the thread continues running while the object is alive, before i thought the thread will terminate when reaching the end of its method

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