Click here to Skip to main content
15,912,400 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to handle empty text boxes Pin
nlarson1112-Jul-07 7:51
nlarson1112-Jul-07 7:51 
GeneralRe: How to handle empty text boxes Pin
nlarson1112-Jul-07 8:02
nlarson1112-Jul-07 8:02 
AnswerRe: How to handle empty text boxes Pin
Christian Graus12-Jul-07 8:04
protectorChristian Graus12-Jul-07 8:04 
GeneralRe: How to handle empty text boxes Pin
nlarson1112-Jul-07 8:14
nlarson1112-Jul-07 8:14 
AnswerRe: How to handle empty text boxes Pin
The ANZAC12-Jul-07 12:58
The ANZAC12-Jul-07 12:58 
QuestionBackgroundWorker help Pin
Paul .12-Jul-07 7:32
Paul .12-Jul-07 7:32 
AnswerRe: BackgroundWorker help Pin
nlarson1112-Jul-07 7:53
nlarson1112-Jul-07 7:53 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:02
Paul .12-Jul-07 8:02 
i forgot to mention it was already set to true. It stops fine, it's only when i want to restart that it gives me an exception.

here is part of the code: (cancellation support is already set to true)

Private Sub stopdwlbut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stopdwlbut.Click

Me.bgworker1.CancelAsync()

End Sub

Private Sub bgworker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgworker1.DoWork

For Y = 1 To numsites

'does what i want it to do

If Me.bgworker1.CancellationPending Then
e.Cancel = True
CType(bgworker1, BackgroundWorker).ReportProgress(0)
Exit Do
End If

End Sub

Private Sub bgworker1_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bgworker1.ProgressChanged

If e.ProgressPercentage = 0 Then
Downloadbut.Enabled = True
stopdwlbut.Enabled = False
MsgBox("download canceled")
Else
'does something else
End If

End Sub
GeneralRe: BackgroundWorker help Pin
nlarson1112-Jul-07 8:04
nlarson1112-Jul-07 8:04 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:13
Paul .12-Jul-07 8:13 
GeneralRe: BackgroundWorker help Pin
Dave Kreskowiak12-Jul-07 8:48
mveDave Kreskowiak12-Jul-07 8:48 
QuestionRemove an item from a combo box bound to a bindingsource Pin
steve_rm12-Jul-07 6:47
steve_rm12-Jul-07 6:47 
AnswerRe: Remove an item from a combo box bound to a bindingsource Pin
Christian Graus12-Jul-07 6:51
protectorChristian Graus12-Jul-07 6:51 
Questionusing Word.Document's SaveAs Function (VB6) Pin
reegan4112-Jul-07 6:15
reegan4112-Jul-07 6:15 
AnswerRe: using Word.Document's SaveAs Function (VB6) Pin
Thomas Chester12-Jul-07 8:56
Thomas Chester12-Jul-07 8:56 
QuestionBoxing/Unboxing Performance Pin
hrodberaht12-Jul-07 6:09
hrodberaht12-Jul-07 6:09 
AnswerRe: Boxing/Unboxing Performance Pin
Christian Graus12-Jul-07 6:12
protectorChristian Graus12-Jul-07 6:12 
AnswerRe: Boxing/Unboxing Performance Pin
Luc Pattyn12-Jul-07 6:31
sitebuilderLuc Pattyn12-Jul-07 6:31 
AnswerRe: Boxing/Unboxing Performance Pin
Dave Kreskowiak12-Jul-07 7:11
mveDave Kreskowiak12-Jul-07 7:11 
AnswerRe: Boxing/Unboxing Performance Pin
Guffa12-Jul-07 7:23
Guffa12-Jul-07 7:23 
AnswerRe: Boxing/Unboxing Performance [modified] Pin
Dave Kreskowiak12-Jul-07 8:19
mveDave Kreskowiak12-Jul-07 8:19 
AnswerRe: Boxing/Unboxing Performance Pin
hrodberaht12-Jul-07 10:14
hrodberaht12-Jul-07 10:14 
QuestionCheck file existence on FTP Pin
Paul .12-Jul-07 5:03
Paul .12-Jul-07 5:03 
AnswerRe: Check file existence on FTP Pin
Dave Kreskowiak12-Jul-07 5:35
mveDave Kreskowiak12-Jul-07 5:35 
AnswerRe: Check file existence on FTP Pin
Paul .12-Jul-07 5:38
Paul .12-Jul-07 5:38 

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.