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

Visual Basic

 
QuestionI failed to create an excel data sheet from my vb.net application Pin
Zizo_nis1-Aug-09 22:51
Zizo_nis1-Aug-09 22:51 
AnswerRe: I failed to create an excel data sheet from my vb.net application Pin
dan!sh 1-Aug-09 23:02
professional dan!sh 1-Aug-09 23:02 
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 
i tried to convert this code i made class in seperate file
Imports System.Threading
Class program
Private Class MessageInfo
Private iteration As Integer
Private message As String
Public Sub New(ByVal iteration As Integer, ByVal message As String)
Me.iteration = iteration
Me.message = message
End Sub
Public ReadOnly Property Iterations() As Integer
Get
Return iteration
End Get
End Property
Public ReadOnly Property Messages() As String
Get
Return message
End Get
End Property
End Class
Public Shared Sub DisplayMessage(ByVal state As Object)
Dim config As MessageInfo = TryCast(state, MessageInfo)
If config Is Nothing Then
Dim count As Integer
For count = 0 To 2 Step count + 1
Console.WriteLine("a thread pool example")
Thread.Sleep(1000)
Next
Else
Dim count As Integer
For count = 0 To config.Iterations - 1 Step -1
Console.WriteLine(config.Messages)
Thread.Sleep(1000)
Next
End If


End Sub
End Class
'and try to use it in sub Main
Imports System.Threading
Module Module1

Sub Main()

ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage)
Dim info As New MessageInfo(5, "a thread pool example with arguments")
ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage, info)
Console.WriteLine("Main method complete. press enter")
Console.ReadLine()
End Sub

End Module
error
Error 1,2,3 Type 'MessageInfo' is not defined. C:\Documents and Settings\Sokar\My Documents\Visual Studio 2005\Projects\ConsoleApplication16\ConsoleApplication16\Module1.vb 7 25 ConsoleApplication16

Ahmed hassan

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 
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 

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.