IT Community - Software Programming, Web Development and Technical Support

How to implement threading in VB.Net?

This is a discussion on How to implement threading in VB.Net? within the VB.NET Programming forums, part of the Software Development category; Hi , Any one can explain in brief how can we implement threading in VB.Net with sample?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > VB.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-30-2007, 06:27 AM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 322
amansundar is on a distinguished road
Question How to implement threading in VB.Net?

Hi ,

Any one can explain in brief how can we implement threading in VB.Net with sample?
__________________
cheers
Aman
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-30-2007, 06:35 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: How to implement threading in VB.Net?

Ya sure...

Here is the sample....

Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim pthread1 As New Thread(AddressOf Thread1)
Dim pthread2 As New Thread(AddressOf Thread2)
pthread1.Start()
pthread2.Start()
End Sub
Public Sub Thread1()
Dim pintcount As Integer
Dim pstr As String
pstr = “This is first thread”
Do Until pintcount > 5
lstThreadDisplay.Items.Add(pstr)
pintcount = pintcount + 1
Loop
End Sub
Public Sub Thread2()
Dim pintcount As Integer
Dim pstr As String
pstr = “This is second thread”
Do Until pintcount > 5
lstThreadDisplay.Items.Add(pstr)
pintcount = pintcount + 1
Loop
End Sub

Learn with my post......................
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-30-2007, 06:41 AM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 322
amansundar is on a distinguished road
Default Re: How to implement threading in VB.Net?

ya...

I got it buddy..thnx
__________________
cheers
Aman
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.net threading issue when populating a listbox $enthil ASP and ASP.NET Programming 6 11-04-2007 10:24 PM
Threading in VB.Net Tips S.Vinothkumar VB.NET Programming 16 10-30-2007 06:55 AM
Threading in C# .Net 2005 : a.deeban C# Programming 53 09-10-2007 06:27 AM
When working with shared data in threading how do you implement synchronization in a oxygen ASP and ASP.NET Programming 1 07-26-2007 03:07 AM
what is the threading model used for ASP.Net? mobilegeek ASP and ASP.NET Programming 1 07-21-2007 12:48 AM


All times are GMT -7. The time now is 09:36 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0