Click here to Skip to main content
15,920,704 members
Home / Discussions / C#
   

C#

 
Questionreducing image file size Pin
michael@cohen20-Sep-09 19:09
michael@cohen20-Sep-09 19:09 
AnswerRe: reducing image file size Pin
Christian Graus20-Sep-09 19:41
protectorChristian Graus20-Sep-09 19:41 
AnswerRe: reducing image file size Pin
Luc Pattyn21-Sep-09 1:01
sitebuilderLuc Pattyn21-Sep-09 1:01 
Questionhow to count printed total pages [modified] Pin
scoket20-Sep-09 17:48
scoket20-Sep-09 17:48 
QuestionThread scheduling [modified] Pin
Kwonhyung Roh20-Sep-09 16:58
Kwonhyung Roh20-Sep-09 16:58 
AnswerRe: Thread scheduling Pin
Dave Kreskowiak20-Sep-09 17:02
mveDave Kreskowiak20-Sep-09 17:02 
GeneralRe: Thread scheduling Pin
Kwonhyung Roh20-Sep-09 18:15
Kwonhyung Roh20-Sep-09 18:15 
GeneralRe: Thread scheduling Pin
Dave Kreskowiak21-Sep-09 2:11
mveDave Kreskowiak21-Sep-09 2:11 
Like I said, touching a UI control (MessageBox, and the WMP) from anything other than the thread your app started on, will yield very weird results. You cannot call the Play method directly from the background worker thread. You cannot directly touch any UI control from a different thread than it was created on.


Kwonhyung Roh wrote:
I rewrote them as the method for convenience' sake


You can Invoke the Play method from the background thread, which tells the thread that Form1 is on to execute the code. Something like:
    Private Delegate Sub PlayDelegate()
.
.
.
    ' This would be inside the BackgroundWorker target.
    Form1.Invoke(New PlayDelegate(AddressOf Play))



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




GeneralRe: Thread scheduling Pin
Kwonhyung Roh21-Sep-09 17:31
Kwonhyung Roh21-Sep-09 17:31 
GeneralRe: Thread scheduling Pin
Dave Kreskowiak22-Sep-09 4:30
mveDave Kreskowiak22-Sep-09 4:30 
GeneralRe: Thread scheduling Pin
Kwonhyung Roh22-Sep-09 16:14
Kwonhyung Roh22-Sep-09 16:14 
QuestionError using tao framework Pin
billy_iii20-Sep-09 11:42
billy_iii20-Sep-09 11:42 
AnswerRe: Error using tao framework Pin
Henry Minute20-Sep-09 12:40
Henry Minute20-Sep-09 12:40 
GeneralRe: Error using tao framework Pin
billy_iii20-Sep-09 13:23
billy_iii20-Sep-09 13:23 
GeneralRe: Error using tao framework Pin
Dave Kreskowiak20-Sep-09 16:59
mveDave Kreskowiak20-Sep-09 16:59 
AnswerRe: Error using tao framework Pin
carlecomm29-Sep-09 1:25
carlecomm29-Sep-09 1:25 
QuestionCorsor position Pin
Muammar©20-Sep-09 10:29
Muammar©20-Sep-09 10:29 
AnswerRe: Corsor position Pin
Abhishek Sur20-Sep-09 10:32
professionalAbhishek Sur20-Sep-09 10:32 
AnswerRe: Corsor position Pin
Luc Pattyn20-Sep-09 11:01
sitebuilderLuc Pattyn20-Sep-09 11:01 
GeneralRe: Corsor position Pin
Muammar©20-Sep-09 11:18
Muammar©20-Sep-09 11:18 
GeneralRe: Corsor position Pin
Daniel Grunwald20-Sep-09 13:19
Daniel Grunwald20-Sep-09 13:19 
GeneralRe: Corsor position Pin
Luc Pattyn20-Sep-09 13:54
sitebuilderLuc Pattyn20-Sep-09 13:54 
QuestionNullReferenceException untraceable Pin
akhanal20-Sep-09 10:10
akhanal20-Sep-09 10:10 
AnswerRe: NullReferenceException untraceable Pin
Abhishek Sur20-Sep-09 10:31
professionalAbhishek Sur20-Sep-09 10:31 
GeneralRe: NullReferenceException untraceable [modified] Pin
akhanal20-Sep-09 10:37
akhanal20-Sep-09 10:37 

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.