Results 1 to 3 of 3

Thread: Little question about threading... is this right?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Little question about threading... is this right?

    I dont know that much about threading, so I just looked at the namespace and I came up with this. Basically I want the sub to run on a separate thread:

    VB Code:
    1. Private Sub pnlThumbs_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles pnlThumbs.Paint
    2.         Dim t As New Threading.Thread(AddressOf LoadVisibleThumbs)
    3.         t.Start()
    4.     End Sub
    it works fine. I just want to make sure I'm doing it right.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    btw I get this in the output window:
    The thread '<No Name>' (0x8a0) has exited with code 0 (0x0).
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Seems like you are doing it just fine. The output window is just saying that the thread has ended with no errors.

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