Click here to Skip to main content
15,917,862 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Architecture Pin
Henry Minute10-May-10 1:18
Henry Minute10-May-10 1:18 
QuestionProblem with syntax with Wizard in a Select/Where statement Pin
Peter Leipzig9-May-10 20:20
Peter Leipzig9-May-10 20:20 
AnswerRe: Problem with syntax with Wizard in a Select/Where statement Pin
Johan Hakkesteegt9-May-10 21:17
Johan Hakkesteegt9-May-10 21:17 
GeneralRe: Problem with syntax with Wizard in a Select/Where statement Pin
Peter Leipzig10-May-10 9:01
Peter Leipzig10-May-10 9:01 
GeneralRe: Problem with syntax with Wizard in a Select/Where statement Pin
Johan Hakkesteegt10-May-10 20:58
Johan Hakkesteegt10-May-10 20:58 
QuestionHelp Me Pin
MdUmair9-May-10 11:46
MdUmair9-May-10 11:46 
AnswerRe: Help Me Pin
Henry Minute10-May-10 1:21
Henry Minute10-May-10 1:21 
QuestionMulty threading question Pin
Pasan1488-May-10 23:08
Pasan1488-May-10 23:08 
I wrote following code

Imports System.Threading
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim s As New ThreadStart(AddressOf progress)
Dim t As New Thread(s)
t.Start()
End Sub

Sub progress()
For x As Int32 = 1 To 10000
ProgressBar1.Value += 1
Next
End Sub
End Class

I want to increase progress bar value within separate thread. When i run this code it wasn't run as i suppose and it threw Invalid operation exception. It's message is "Cross-thread operation not valid: Control 'ProgressBar1' accessed from a thread other than the thread it was created on."

What happened here. Please someone explain it.
AnswerRe: Multy threading question Pin
Dimitri Witkowski9-May-10 0:01
Dimitri Witkowski9-May-10 0:01 
GeneralRe: Multy threading question Pin
Pasan1489-May-10 0:51
Pasan1489-May-10 0:51 
GeneralRe: Multy threading question Pin
Dimitri Witkowski9-May-10 1:29
Dimitri Witkowski9-May-10 1:29 
AnswerRe: Multy threading question Pin
Luc Pattyn9-May-10 1:59
sitebuilderLuc Pattyn9-May-10 1:59 
AnswerRe: Multy threading question Pin
Yosh_10-May-10 2:12
professionalYosh_10-May-10 2:12 
QuestionAdapting a DLL to VB.NET, using PINVOKE Pin
Hrizip8-May-10 8:44
Hrizip8-May-10 8:44 
AnswerRe: enum, hex literals Pin
Luc Pattyn8-May-10 9:29
sitebuilderLuc Pattyn8-May-10 9:29 
GeneralRe: enum, hex literals Pin
Hrizip8-May-10 10:38
Hrizip8-May-10 10:38 
GeneralRe: enum, hex literals Pin
Hrizip8-May-10 22:10
Hrizip8-May-10 22:10 
GeneralRe: enum, hex literals Pin
Luc Pattyn9-May-10 2:02
sitebuilderLuc Pattyn9-May-10 2:02 
GeneralRe: enum, hex literals Pin
Hrizip9-May-10 2:36
Hrizip9-May-10 2:36 
AnswerRe: P/Invoke Pin
Luc Pattyn8-May-10 9:38
sitebuilderLuc Pattyn8-May-10 9:38 
GeneralRe: P/Invoke Pin
Hrizip8-May-10 10:42
Hrizip8-May-10 10:42 
GeneralRe: P/Invoke Pin
Luc Pattyn8-May-10 10:51
sitebuilderLuc Pattyn8-May-10 10:51 
GeneralRe: P/Invoke Pin
Hrizip8-May-10 10:56
Hrizip8-May-10 10:56 
AnswerRe: baudrate Pin
Luc Pattyn8-May-10 9:41
sitebuilderLuc Pattyn8-May-10 9:41 
GeneralRe: baudrate Pin
Hrizip8-May-10 22:11
Hrizip8-May-10 22:11 

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.