Click here to Skip to main content
15,904,653 members
Home / Discussions / C#
   

C#

 
QuestionUse a maked textbox to limit entry to some char Pin
baranils5-May-08 8:56
baranils5-May-08 8:56 
AnswerRe: Use a maked textbox to limit entry to some char Pin
#realJSOP5-May-08 9:51
professional#realJSOP5-May-08 9:51 
GeneralRe: Use a maked textbox to limit entry to some char Pin
baranils5-May-08 10:07
baranils5-May-08 10:07 
GeneralRe: Use a maked textbox to limit entry to some char Pin
#realJSOP5-May-08 11:03
professional#realJSOP5-May-08 11:03 
GeneralRe: Use a maked textbox to limit entry to some char Pin
baranils5-May-08 19:14
baranils5-May-08 19:14 
AnswerRe: Use a maked textbox to limit entry to some char Pin
Christian Graus5-May-08 18:08
protectorChristian Graus5-May-08 18:08 
GeneralRe: Use a maked textbox to limit entry to some char Pin
#realJSOP6-May-08 3:30
professional#realJSOP6-May-08 3:30 
QuestionHow to traverse class properties for Nunit tests? Pin
pankazmittal5-May-08 6:47
pankazmittal5-May-08 6:47 
AnswerRe: How to traverse class properties for Nunit tests? Pin
Gareth H5-May-08 7:36
Gareth H5-May-08 7:36 
AnswerRe: How to traverse class properties for Nunit tests? Pin
Brady Kelly5-May-08 8:37
Brady Kelly5-May-08 8:37 
AnswerRe: How to traverse class properties for Nunit tests? Pin
Ed.Poore5-May-08 12:02
Ed.Poore5-May-08 12:02 
QuestionLoadPostData Error Pin
ceetee5-May-08 5:53
ceetee5-May-08 5:53 
AnswerRe: LoadPostData Error Pin
Gareth H5-May-08 6:21
Gareth H5-May-08 6:21 
GeneralRe: LoadPostData Error Pin
ceetee5-May-08 7:12
ceetee5-May-08 7:12 
Questiondisable taskmanager Pin
False Chicken5-May-08 5:03
False Chicken5-May-08 5:03 
AnswerRe: disable taskmanager Pin
tgrt5-May-08 5:42
tgrt5-May-08 5:42 
AnswerRe: disable taskmanager Pin
Dave Kreskowiak5-May-08 6:48
mveDave Kreskowiak5-May-08 6:48 
AnswerRe: disable taskmanager Pin
Giorgi Dalakishvili5-May-08 8:07
mentorGiorgi Dalakishvili5-May-08 8:07 
AnswerRe: disable taskmanager Pin
PIEBALDconsult5-May-08 8:44
mvePIEBALDconsult5-May-08 8:44 
QuestionAdd login form to a program? Pin
daden2035-May-08 4:48
daden2035-May-08 4:48 
AnswerRe: Add login form to a program? Pin
carbon_golem5-May-08 6:51
carbon_golem5-May-08 6:51 
Questionhow I know that which property is associated which file at run time. Pin
Guru Call5-May-08 4:47
Guru Call5-May-08 4:47 
QuestionRunning a form in a diferent Thread Pin
oscarderooij5-May-08 4:07
oscarderooij5-May-08 4:07 
Hi there,

First of all let me say that I tried to find this here in codeproject and google... but I think I'm missing the keywords to find what I want.

What I'm looking for I think it is pretty common.
The thing is... after learning about delegates and threads and trying to implement it in my project I'm still having a freez while the client draws grids.

Let's go to the details:
I have a mainprogram that calls diferent forms from its menu.
One of this forms needs to draw graphics and (Xceed) Grids with lot of data.
The problem: while drawing these graphics and grids, the whole program freezes (all open forms, this form and the mainprogram).

While trying to solve this problem I started researching about delegates, threads and everything else that popped up in the articles. With all I learned I was able to do some things in my project that increased its performance. But in this particular problem, even when the "drawing function" is put in another thread, the mainprogram continues to freez.

I really want to understand why this is happening and how to solve this, so please tell me if I'm wrong.
I'm guessing that the problem happens because the "drawing function" needs to be runned in the same thread as the "form creator" thread, in this case the mainprogram. This way, although the "drawing function" is called through a delegate, its begin starts with "if (this.invokeRequired) this.Invoke" to avoid cross threading problem.

I don't really know in wich thread the "this.Invoke" will execute my "drawing function" but I'm almost certain that is in the mainprogram's one. So it will keep on freezing.

With this in mind I looked in google and here at codeproject the only way I though of to solve this: a way to run the Form in a diferent thread from the mainprogram. Just like as it was a diferent process. This way the "this.Invoke" would call the paralel thread that runs only the Form, and not the whole mainprogram, stopping the freez problem.

I didn't find something that made me do this succesfully and that brings me here.
Can anyone teach me a way to work around this problem? If there is a way to solve this without creating a thread for this form alone, please, I would like to hear it (if creating a thread is a solution at all... I really don't know).

If I said something wrong, I'm sorry, I'm still a jr here. Please tell me so I can learn better about this.

Thanks in advance,
Oscar
AnswerRe: Running a form in a diferent Thread Pin
S. Senthil Kumar5-May-08 5:34
S. Senthil Kumar5-May-08 5:34 
GeneralRe: Running a form in a diferent Thread Pin
oscarderooij6-May-08 2:29
oscarderooij6-May-08 2:29 

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.