Click here to Skip to main content
15,890,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionError while convert C# to VB Pin
Member 829391525-Dec-11 5:30
Member 829391525-Dec-11 5:30 
AnswerRe: Error while convert C# to VB Pin
Luc Pattyn25-Dec-11 12:24
sitebuilderLuc Pattyn25-Dec-11 12:24 
QuestionExample Api hook for ExitWindowsEx Pin
Edbanger196124-Dec-11 6:29
Edbanger196124-Dec-11 6:29 
AnswerRe: Example Api hook for ExitWindowsEx Pin
Luc Pattyn25-Dec-11 12:27
sitebuilderLuc Pattyn25-Dec-11 12:27 
GeneralRe: Example Api hook for ExitWindowsEx Pin
Edbanger196125-Dec-11 19:52
Edbanger196125-Dec-11 19:52 
QuestionLooking for developers to help in free and opensource project Pin
Constantinos Coudounaris23-Dec-11 8:39
Constantinos Coudounaris23-Dec-11 8:39 
AnswerRe: Looking for developers to help in free and opensource project Pin
Dalek Dave23-Dec-11 9:52
professionalDalek Dave23-Dec-11 9:52 
Answer[resolved] Update form from other thread Pin
Sonhospa22-Dec-11 22:34
Sonhospa22-Dec-11 22:34 
Hello gurus,

I hope someone is around these days, and to everyone who sees this I want to wish a Merry Christmas and a Happy Holiday!

But "let's get down to business": In my application I have to update the form from a different thread, which I do with the following code:
Private Sub UpdateProgress(ByVal value As Integer, ByVal labelText As String)
    If StatusStrip.InvokeRequired Then
	StatusStrip.Invoke(ProgressUpdater, New Object() {value, labelText})      <---- ERROR
    Else
        If value > StatusProgressMain.Maximum Then value = 100
        StatusProgressMain.Value = value
	StatusLabelMain.Text = String.Format("{0} Records", mDVdata.Count)
    End If
End Sub
Unfortunately I run into 'NULL referece exception' when invoking the StatusStrip although neither the value nor the labeltext variables are NULL. Do I probably overlook something like a plain syntax error?

Thank you for reviewing and any hint!
Mick


EDIT / RESOLUTION:
The exception turned out to be thrown in a different part of the procedure, the 'Else' clause: The mDVdata datatable wasn't properly declared!

modified 23-Dec-11 7:05am.

QuestionRe: Update form from other thread Pin
Richard MacCutchan22-Dec-11 22:50
mveRichard MacCutchan22-Dec-11 22:50 
AnswerRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:16
Sonhospa23-Dec-11 0:16 
GeneralRe: Update form from other thread Pin
Richard MacCutchan23-Dec-11 0:42
mveRichard MacCutchan23-Dec-11 0:42 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 1:02
Sonhospa23-Dec-11 1:02 
AnswerRe: Update form from other thread Pin
Shameel22-Dec-11 23:18
professionalShameel22-Dec-11 23:18 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:05
Sonhospa23-Dec-11 0:05 
GeneralRe: Update form from other thread Pin
Shameel23-Dec-11 0:31
professionalShameel23-Dec-11 0:31 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:36
Sonhospa23-Dec-11 0:36 
GeneralRe: Update form from other thread Pin
Shameel23-Dec-11 1:02
professionalShameel23-Dec-11 1:02 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 1:03
Sonhospa23-Dec-11 1:03 
GeneralRe: Update form from other thread Pin
Shameel23-Dec-11 1:45
professionalShameel23-Dec-11 1:45 
QuestionData Type Conversion Error Pin
Ashu Tosh Sharma22-Dec-11 1:40
Ashu Tosh Sharma22-Dec-11 1:40 
AnswerRe: Data Type Conversion Error Pin
Estys22-Dec-11 2:02
Estys22-Dec-11 2:02 
SuggestionRe: Data Type Conversion Error Pin
RaviRanjanKr23-Dec-11 10:22
professionalRaviRanjanKr23-Dec-11 10:22 
Answervb.net Pin
aliyare22-Dec-11 0:37
aliyare22-Dec-11 0:37 
GeneralRe: vb.net Pin
Richard MacCutchan22-Dec-11 1:04
mveRichard MacCutchan22-Dec-11 1:04 
AnswerRe: vb.net Pin
Luc Pattyn22-Dec-11 1:07
sitebuilderLuc Pattyn22-Dec-11 1:07 

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.