Click here to Skip to main content
16,005,037 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
Pasan,

Pasan148 wrote:
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."


You can achieve this very easily using the background worker class (http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[^]).
Just enable progress change and supports cancellation on the background worker object. Then, in the Do_Work sub, report progress, and you can easily update your progressbar in the progresschanged event.

Hope this helps.
He who goes for revenge must first dig two graves.

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 
AnswerRe: RegKey Pin
Luc Pattyn8-May-10 9:46
sitebuilderLuc Pattyn8-May-10 9:46 
GeneralRe: RegKey Pin
Hrizip8-May-10 22:11
Hrizip8-May-10 22:11 
AnswerRe: CallbackWrapper Pin
Luc Pattyn8-May-10 9:50
sitebuilderLuc Pattyn8-May-10 9:50 
AnswerRe: overall Pin
Luc Pattyn8-May-10 9:57
sitebuilderLuc Pattyn8-May-10 9:57 
GeneralRe: overall Pin
Hrizip8-May-10 10:52
Hrizip8-May-10 10:52 

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.