Click here to Skip to main content
15,905,148 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVisual Basic 2008 Express Edition: Retrieve emails from POP3 server Pin
helen004-Jan-09 17:50
helen004-Jan-09 17:50 
AnswerRe: Visual Basic 2008 Express Edition: Retrieve emails from POP3 server Pin
NidhiKanu4-Jan-09 20:19
professionalNidhiKanu4-Jan-09 20:19 
AnswerRe: Visual Basic 2008 Express Edition: Retrieve emails from POP3 server Pin
Bharat Jain5-Jan-09 1:13
Bharat Jain5-Jan-09 1:13 
AnswerRe: Visual Basic 2008 Express Edition: Retrieve emails from POP3 server Pin
Ashfield5-Jan-09 1:32
Ashfield5-Jan-09 1:32 
QuestionWebBrowser Drag and Drop Pin
StuBaum4-Jan-09 11:28
StuBaum4-Jan-09 11:28 
AnswerRe: WebBrowser Drag and Drop Pin
StuBaum14-Jan-09 8:21
StuBaum14-Jan-09 8:21 
QuestionHow to create forms in background worker thread in vb.net Pin
sohaib_a4-Jan-09 7:18
sohaib_a4-Jan-09 7:18 
AnswerRe: How to create forms in background worker thread in vb.net Pin
Naji El Kotob4-Jan-09 11:32
Naji El Kotob4-Jan-09 11:32 
Hi,

This is a threading issue. Try to move your code from DoWork to a new sub e.g.

1.
Private Sub CreateNewForm()
Dim f As New System.Windows.Forms.Form

Dim label1 As New System.Windows.Forms.TextBox

f.Size = New System.Drawing.Size(487, 416)
f.Name = "Form6"

f.Text = "Form6"
f.Location = New System.Drawing.Point(0, 0)
label1.Name = "text1"
label1.Size = New System.Drawing.Size(100, 20)
label1.Location = New System.Drawing.Point(54, 37)
f.BackColor = Color.Gray
f.Activate()
f.Controls.Add(label1)
f.Show()

End Sub

2.

At the member level add:
Private Delegate Sub delCreateNewForm()

3.

In the DoWork sub invoke the CreateNewForm sub:

Private Sub DoJob(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
Dim d As New delCreateNewForm(AddressOf CreateNewForm)
Me.Invoke(d)
End Sub

Hope this helps Smile | :)

NajiCo http://www.InsideVB.NET[^]

It's nice 2b important, but it's more important 2b nice...
http://www.facebook.com/group.php?gid=5932660937[^]

GeneralRe: How to create forms in background worker thread in vb.net Pin
sohaib_a4-Jan-09 19:02
sohaib_a4-Jan-09 19:02 
GeneralRe: How to create forms in background worker thread in vb.net Pin
Guffa4-Jan-09 19:42
Guffa4-Jan-09 19:42 
QuestionVBscript Pin
oburaochola4-Jan-09 5:50
oburaochola4-Jan-09 5:50 
AnswerRe: VBscript Pin
Colin Angus Mackay4-Jan-09 5:51
Colin Angus Mackay4-Jan-09 5:51 
AnswerRe: VBscript Pin
Eddy Vluggen7-Jan-09 0:49
professionalEddy Vluggen7-Jan-09 0:49 
QuestionVB Script Project Pin
oburaochola4-Jan-09 4:22
oburaochola4-Jan-09 4:22 
AnswerRe: VB homework assignment Pin
Guffa4-Jan-09 4:49
Guffa4-Jan-09 4:49 
GeneralRe: VB homework assignment Pin
oburaochola4-Jan-09 6:07
oburaochola4-Jan-09 6:07 
GeneralRe: VB homework assignment Pin
Guffa4-Jan-09 19:33
Guffa4-Jan-09 19:33 
QuestionShow form from dll? Pin
andyr20053-Jan-09 17:50
andyr20053-Jan-09 17:50 
AnswerRe: Show form from dll? Pin
dan!sh 3-Jan-09 22:54
professional dan!sh 3-Jan-09 22:54 
AnswerRe: Show form from dll? Pin
Jon_Boy4-Jan-09 5:21
Jon_Boy4-Jan-09 5:21 
QuestionClose file open as an image in Picturebox Pin
Amanjot3-Jan-09 17:32
Amanjot3-Jan-09 17:32 
AnswerRe: Close file open as an image in Picturebox Pin
Dave Kreskowiak4-Jan-09 0:13
mveDave Kreskowiak4-Jan-09 0:13 
GeneralRe: Close file open as an image in Picturebox Pin
Jon_Boy4-Jan-09 5:25
Jon_Boy4-Jan-09 5:25 
GeneralRe: Close file open as an image in Picturebox Pin
Dave Kreskowiak4-Jan-09 6:59
mveDave Kreskowiak4-Jan-09 6:59 
GeneralRe: Close file open as an image in Picturebox Pin
Amanjot4-Jan-09 6:10
Amanjot4-Jan-09 6:10 

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.