Results 1 to 2 of 2

Thread: Win form and threading?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Question Win form and threading?

    In windows application, I want in new thread to show form. How to do that?

    regard j

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    First import the System.Threading namespace

    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim t As New Thread(AddressOf Me.MySub)
    3.         t.Start()
    4. End Sub
    5.  
    6. Sub MySub()
    7.         Dim f As New Form1
    8.         f.ShowDialog()
    9. End Sub

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