Click here to Skip to main content
15,914,642 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: problem in loading the project Pin
Prakash_Mishra4-Jun-07 20:53
Prakash_Mishra4-Jun-07 20:53 
Questionhow can i create connection and do the operation in vb Pin
koolprasad20033-Jun-07 21:10
professionalkoolprasad20033-Jun-07 21:10 
AnswerRe: how can i create connection and do the operation in vb Pin
originSH3-Jun-07 23:24
originSH3-Jun-07 23:24 
Questionerror with thread Pin
WhiteGirl233-Jun-07 20:58
WhiteGirl233-Jun-07 20:58 
AnswerRe: error with thread Pin
Dave Kreskowiak4-Jun-07 3:44
mveDave Kreskowiak4-Jun-07 3:44 
GeneralRe: error with thread Pin
WhiteGirl234-Jun-07 20:23
WhiteGirl234-Jun-07 20:23 
GeneralRe: error with thread Pin
Dave Kreskowiak6-Jun-07 16:29
mveDave Kreskowiak6-Jun-07 16:29 
QuestionProgressBar Thread Pin
ayeleteric3-Jun-07 19:56
ayeleteric3-Jun-07 19:56 
Hello,

I am trying to do as following and I am getting the message
"Cross-thread operation not valid: Control 'ProgressBar1' accessed from a thread other than the thread it was created on.":

My Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ind As Integer
Button1.Enabled = False

ProgressBar1.Step = 21
ProgressBar1.Value = 0
Dim trd As Threading.Thread = New Threading.Thread(AddressOf ThreadDo)
trd.Start()

ListBox1.Items.Clear()
For ind = 0 To 50000
ListBox1.Items.Add(ind)
Next

Button1.Enabled = True

End Sub

Private Sub ThreadDo()
ProgressBar1.PerformStep()
If ProgressBar1.Value >= ProgressBar1.Maximum Then
Timer1.Enabled = False
End If
End Sub

Please help
Thank you

Eric H.

AnswerRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 20:25
protectorChristian Graus3-Jun-07 20:25 
GeneralRe: ProgressBar Thread Pin
ayeleteric3-Jun-07 20:49
ayeleteric3-Jun-07 20:49 
GeneralRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 21:55
protectorChristian Graus3-Jun-07 21:55 
GeneralRe: ProgressBar Thread Pin
ayeleteric3-Jun-07 21:59
ayeleteric3-Jun-07 21:59 
AnswerRe: ProgressBar Thread Pin
ScottM13-Jun-07 23:21
ScottM13-Jun-07 23:21 
GeneralRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 23:46
protectorChristian Graus3-Jun-07 23:46 
GeneralRe: ProgressBar Thread Pin
ScottM13-Jun-07 23:59
ScottM13-Jun-07 23:59 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:09
protectorChristian Graus4-Jun-07 0:09 
GeneralRe: ProgressBar Thread Pin
ScottM14-Jun-07 0:22
ScottM14-Jun-07 0:22 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:25
protectorChristian Graus4-Jun-07 0:25 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 0:00
ayeleteric4-Jun-07 0:00 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:12
protectorChristian Graus4-Jun-07 0:12 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 0:16
ayeleteric4-Jun-07 0:16 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:30
protectorChristian Graus4-Jun-07 0:30 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 3:28
ayeleteric4-Jun-07 3:28 
GeneralRe: ProgressBar Thread Pin
ScottM14-Jun-07 0:17
ScottM14-Jun-07 0:17 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 0:20
ayeleteric4-Jun-07 0:20 

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.