program disables the application
-
Hi guys, I need your help. I am not a pro in C# and have stalled with a problem. My application does a bunch of things in the following function and this function is called when a button is clicked. upon clicking and upon execution of these functions my application background stalls/turns white due to I believe memory overloading. Please advice on what I could do to avoid that, I tried using application.doevents() but that causes then my MDI screen to go white :) Please advice.... public bool ProcessMain(string []psfile,out string sErrMessage) { bool rt=true; string ErrMessage=string.Empty; sErrMessage=string.Empty; try { rt=CleanBox(out ErrMessage); if(rt) { rt=ParseFile(psfile,out ErrMessage); if(rt) { rt=ProcessBatch(out ErrMessage); if(rt) { rt=ProcessErrors(out ErrMessage); if(rt) {
Sameer
-
Hi guys, I need your help. I am not a pro in C# and have stalled with a problem. My application does a bunch of things in the following function and this function is called when a button is clicked. upon clicking and upon execution of these functions my application background stalls/turns white due to I believe memory overloading. Please advice on what I could do to avoid that, I tried using application.doevents() but that causes then my MDI screen to go white :) Please advice.... public bool ProcessMain(string []psfile,out string sErrMessage) { bool rt=true; string ErrMessage=string.Empty; sErrMessage=string.Empty; try { rt=CleanBox(out ErrMessage); if(rt) { rt=ParseFile(psfile,out ErrMessage); if(rt) { rt=ProcessBatch(out ErrMessage); if(rt) { rt=ProcessErrors(out ErrMessage); if(rt) {
Sameer
Create a worker thread and run the method from there.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Create a worker thread and run the method from there.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Thank you Justin, Unfortunately I am clueless about threads, i researched google but can't figure out exactly on how to implement it with my code. Please advice
Sameer
This article[^] is pretty simple, and straight forward. It has some sample code, with comments. It should be pretty easy to figure out, and then implement for your own needs. Good luck :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
This article[^] is pretty simple, and straight forward. It has some sample code, with comments. It should be pretty easy to figure out, and then implement for your own needs. Good luck :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer