Click here to Skip to main content
15,887,434 members
Home / Discussions / C#
   

C#

 
QuestionSelecting Row in GridView to show another GridView Pin
junisulaiman23-Apr-07 4:23
junisulaiman23-Apr-07 4:23 
AnswerRe: Selecting Row in GridView to show another GridView Pin
SABhatti23-Apr-07 5:36
SABhatti23-Apr-07 5:36 
GeneralRe: Selecting Row in GridView to show another GridView Pin
junisulaiman2-May-07 7:00
junisulaiman2-May-07 7:00 
GeneralRe: Selecting Row in GridView to show another GridView Pin
SABhatti2-May-07 13:16
SABhatti2-May-07 13:16 
QuestionDigital Persona 4000B Finer Reader Pin
| Muhammad Waqas Butt |23-Apr-07 3:49
professional| Muhammad Waqas Butt |23-Apr-07 3:49 
AnswerRe: Digital Persona 4000B Finer Reader Pin
Judah Gabriel Himango23-Apr-07 4:08
sponsorJudah Gabriel Himango23-Apr-07 4:08 
GeneralRe: Digital Persona 4000B Finer Reader Pin
| Muhammad Waqas Butt |23-Apr-07 4:18
professional| Muhammad Waqas Butt |23-Apr-07 4:18 
Questioncan't get WorkerThread to work using .Invoke Pin
Ashley Sanders23-Apr-07 3:46
Ashley Sanders23-Apr-07 3:46 
I read Worker Threads in C# by Alex F, and it seemed to be just what I needed, but I am ignorant enough in C# to have problems and I am desparate enough to repost my question on the main forum for help.

Basically, I have a windows form that takes a bunch of user input and goes off to run a lengthy simulation. I wanted to move the simulation to a separate thread to allow for an abort or pause control on the form, but still be able to post updates back to a box in the form.

I used the nifty Visual C# Express tools to make the form, so the form is partial classes split in two files, by default, the partial class is set to inherit from Form in the designer file, but if I understand how partial classes work it shouldn't matter where that goes. Other than this, I'm pretty sure I have crammed Alex's code into mine correctly. but...

In the class for the process to run on the worker thread, Alex uses
m_form.Invoke(m_form.m_DelegateAddString, new Object[] {s});
I'm not sure what m_form is (or how it relates to MainForm) I know this is some fairly standard example naming convention but I can't figure it out, and I frankly can't figure out anything with the Invoke method available. I've tried just reading about Invoke, but it just left me more confused. Confused | :confused:

I tried to get the thing to compile just leaving the meat of the long process out, but I get an No overload error with this line
longProcess = new LongProcess(m_EventStopThread, m_EventThreadStopped, this);
I assume because I am missing those parts in the LongProcess Run method.

I'm hoping that someone reading this is familiar with this article (but wouldn't have seen my plea there), and can help.

Unfortunately, I have to present this little project tomorrow with or without the thread Cry | :(( , and the thread would be so much more professional...

Thanks in advance,
Ashley
AnswerRe: can't get WorkerThread to work using .Invoke Pin
Judah Gabriel Himango23-Apr-07 4:04
sponsorJudah Gabriel Himango23-Apr-07 4:04 
AnswerRe: can't get WorkerThread to work using .Invoke Pin
Mark Greenwood23-Apr-07 4:07
Mark Greenwood23-Apr-07 4:07 
GeneralRe: can't get WorkerThread to work using .Invoke Pin
Ashley Sanders23-Apr-07 5:48
Ashley Sanders23-Apr-07 5:48 
QuestionHow to send HTTP request from C# code? Pin
Affan Toor23-Apr-07 3:37
Affan Toor23-Apr-07 3:37 
AnswerRe: How to send HTTP request from C# code? Pin
Jax_qqq23-Apr-07 3:58
Jax_qqq23-Apr-07 3:58 
GeneralRe: How to send HTTP request from C# code? Pin
Affan Toor23-Apr-07 5:37
Affan Toor23-Apr-07 5:37 
AnswerRe: How to send HTTP request from C# code? Pin
Judah Gabriel Himango23-Apr-07 4:01
sponsorJudah Gabriel Himango23-Apr-07 4:01 
GeneralRe: How to send HTTP request from C# code? Pin
Jax_qqq23-Apr-07 4:33
Jax_qqq23-Apr-07 4:33 
GeneralRe: How to send HTTP request from C# code? Pin
Judah Gabriel Himango23-Apr-07 4:40
sponsorJudah Gabriel Himango23-Apr-07 4:40 
QuestionHow to create a Field Object dynamically in Crystalreport Pin
renjithgk23-Apr-07 2:50
renjithgk23-Apr-07 2:50 
QuestionThe beer game Pin
moh_rabie23-Apr-07 2:26
moh_rabie23-Apr-07 2:26 
AnswerRe: The beer game Pin
Colin Angus Mackay23-Apr-07 2:41
Colin Angus Mackay23-Apr-07 2:41 
GeneralRe: The beer game Pin
moh_rabie23-Apr-07 2:46
moh_rabie23-Apr-07 2:46 
GeneralRe: The beer game Pin
Colin Angus Mackay23-Apr-07 3:05
Colin Angus Mackay23-Apr-07 3:05 
GeneralRe: The beer game Pin
Tamimi - Code23-Apr-07 3:11
Tamimi - Code23-Apr-07 3:11 
GeneralRe: The beer game Pin
Martin#23-Apr-07 3:14
Martin#23-Apr-07 3:14 
GeneralRe: The beer game Pin
moh_rabie23-Apr-07 3:19
moh_rabie23-Apr-07 3:19 

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.