Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: I failed to create an excel data sheet from my vb.net application Pin
Zizo_nis11-Aug-09 4:48
Zizo_nis11-Aug-09 4:48 
Questionthread problem Pin
hassanasp1-Aug-09 4:26
hassanasp1-Aug-09 4:26 
AnswerRe: thread problem Pin
Dave Kreskowiak1-Aug-09 5:04
mveDave Kreskowiak1-Aug-09 5:04 
Questionproblem with thread program converting from c# to vb.net Pin
hassanasp1-Aug-09 3:02
hassanasp1-Aug-09 3:02 
AnswerRe: problem with thread program converting from c# to vb.net Pin
Henry Minute1-Aug-09 3:09
Henry Minute1-Aug-09 3:09 
GeneralRe: problem with thread program converting from c# to vb.net Pin
hassanasp1-Aug-09 3:18
hassanasp1-Aug-09 3:18 
GeneralRe: problem with thread program converting from c# to vb.net Pin
Dave Kreskowiak1-Aug-09 5:03
mveDave Kreskowiak1-Aug-09 5:03 
AnswerRe: problem with thread program converting from c# to vb.net Pin
Dave Doknjas1-Aug-09 12:55
Dave Doknjas1-Aug-09 12:55 
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Threading

Namespace ConsoleApplication13
	Friend Class Program
		Private Class Massegeinfo
'INSTANT VB NOTE: The variable iterations was renamed since Visual Basic does not allow class members with the same name:
			Private iterations_Renamed As Integer
'INSTANT VB NOTE: The variable massage was renamed since Visual Basic does not allow class members with the same name:
			Private massage_Renamed As String
			Public Sub New(ByVal iterations As Integer, ByVal massage As String)
				Me.iterations_Renamed=iterations
				Me.massage_Renamed=massage
			End Sub
			Public ReadOnly Property Iterations() As Integer
				Get
					Return iterations_Renamed
				End Get
			End Property
			Public ReadOnly Property Massage() As String
				Get
					Return massage_Renamed
				End Get
			End Property
		End Class

		Public Shared Sub displayMessage(ByVal state As Object)
			Dim config As Massegeinfo=TryCast(state, Massegeinfo)
			If config Is Nothing Then
				For count As Integer = 0 To 2
					Console.WriteLine("a thread pool example")
					Thread.Sleep(1000)
				Next count
			Else
				For count As Integer = 0 To config.Iterations - 1
					Console.WriteLine(config.Massage)
					Thread.Sleep(1000)
				Next count
			End If

		End Sub

		Shared Sub Main(ByVal args() As String)
			ThreadPool.QueueUserWorkItem(AddressOf displayMessage)
			Dim info As New Massegeinfo(5, "A thread pool example with arguments")
			ThreadPool.QueueUserWorkItem(AddressOf displayMessage, info)
			Console.WriteLine("Main method complete. press enter")
			Console.ReadLine()
		End Sub
	End Class
End Namespace


David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB

Questiondynamically change field height in crystal report Pin
JC.KaNNaN1-Aug-09 0:30
JC.KaNNaN1-Aug-09 0:30 
QuestionStoredprocedure execution error. Pin
specialdreamsin1-Aug-09 0:29
specialdreamsin1-Aug-09 0:29 
AnswerRe: Storedprocedure execution error. Pin
Moreno Airoldi1-Aug-09 1:53
Moreno Airoldi1-Aug-09 1:53 
GeneralRe: Storedprocedure execution error. Pin
specialdreamsin1-Aug-09 2:01
specialdreamsin1-Aug-09 2:01 
GeneralRe: Storedprocedure execution error. Pin
Moreno Airoldi1-Aug-09 2:11
Moreno Airoldi1-Aug-09 2:11 
GeneralRe: Storedprocedure execution error. Pin
Dave Kreskowiak1-Aug-09 4:54
mveDave Kreskowiak1-Aug-09 4:54 
Questionproblem related to gridview Pin
nazimghori31-Jul-09 23:26
nazimghori31-Jul-09 23:26 
AnswerRe: problem related to gridview Pin
Mycroft Holmes31-Jul-09 23:38
professionalMycroft Holmes31-Jul-09 23:38 
QuestionReading sectors Pin
rezamirhashem31-Jul-09 22:47
rezamirhashem31-Jul-09 22:47 
AnswerRe: Reading sectors Pin
Eddy Vluggen1-Aug-09 0:18
professionalEddy Vluggen1-Aug-09 0:18 
QuestionHow can made safer application that is not detect by antivirus? Pin
Le@rner31-Jul-09 21:04
Le@rner31-Jul-09 21:04 
AnswerRe: How can made safer application that is not detect by antivirus? Pin
Eddy Vluggen1-Aug-09 0:25
professionalEddy Vluggen1-Aug-09 0:25 
AnswerRe: How can made safer application that is not detect by antivirus? Pin
Dave Kreskowiak1-Aug-09 4:50
mveDave Kreskowiak1-Aug-09 4:50 
QuestionOutlook Addin Loading Error [modified]nks Pin
dcdhingra31-Jul-09 20:37
dcdhingra31-Jul-09 20:37 
AnswerRe: Outlook Addin Loading Error [modified]nks Pin
Dave Kreskowiak1-Aug-09 4:47
mveDave Kreskowiak1-Aug-09 4:47 
GeneralRe: Outlook Addin Loading Error [modified]nks Pin
dcdhingra1-Aug-09 16:37
dcdhingra1-Aug-09 16:37 
QuestionAsynchronous Socket Problem Pin
Nick Rioux31-Jul-09 16:12
Nick Rioux31-Jul-09 16:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.