Click here to Skip to main content
16,004,944 members
Home / Discussions / C#
   

C#

 
GeneralRe: RightToLeft TabControl Pin
Kodanda Pani13-Mar-05 18:20
Kodanda Pani13-Mar-05 18:20 
GeneralRe: RightToLeft TabControl Pin
Mikel Fayad13-Mar-05 22:03
Mikel Fayad13-Mar-05 22:03 
Generalpanel redraw problem Pin
ddeedee@hotmail.com12-Mar-05 22:30
ddeedee@hotmail.com12-Mar-05 22:30 
GeneralRe: panel redraw problem Pin
leppie12-Mar-05 22:43
leppie12-Mar-05 22:43 
GeneralDisappearing Structure Pin
gmhanna12-Mar-05 18:23
gmhanna12-Mar-05 18:23 
GeneralRe: Disappearing Structure Pin
leppie12-Mar-05 22:31
leppie12-Mar-05 22:31 
Generallistview columns Pin
ekynox12-Mar-05 17:20
ekynox12-Mar-05 17:20 
GeneralSystem.Diagnostics.Process() expert needed... Pin
new_phoenix12-Mar-05 16:34
new_phoenix12-Mar-05 16:34 
The following is pseudocode that would solve a problem I have encountered with regard to process management. Could you kindly take a look at it and point me in the right direction regarding how to prevent lost processes from occurring in between application running attempts, if the user clicks the cancel button or abends the application?

If the user cancels the application module from running in the middle of processing, and that module spawns a series of processes, then some of those processes may still be running and will throw an error if the user tries to run the program again.


<br />
foreach (process in TaskManager.Processes)<br />
{<br />
  if ((process.accesses(System.IO.File(fileName1))) ||<br />
     (process.accesses(System.IO.File(fileName2))) ||<br />
     (process.accesses(System.IO.File(fileName3))) ||<br />
     (process.accesses(System.IO.File(fileName4))))<br />
  {<br />
     process.kill();  // or process.dispose(); ???<br />
  }<br />
}<br />


Would really appreciate some input to guide me in the right direction. I know that the code above probably does not exist, but is there some way of clearing all actively running processes that each access their own specific files so that the application can start fresh and clean. That way I would not get the following error message: "the file fileName2 cannot be accessed because it is being used by another process". Confused | :confused: Confused | :confused: Confused | :confused:
GeneralRe: System.Diagnostics.Process() expert needed... Pin
yoaz13-Mar-05 3:03
yoaz13-Mar-05 3:03 
Generallexical analyzer Pin
WaleedH12-Mar-05 11:52
WaleedH12-Mar-05 11:52 
GeneralRe: lexical analyzer Pin
Robert Rohde12-Mar-05 20:22
Robert Rohde12-Mar-05 20:22 
GeneralRe: lexical analyzer Pin
leppie12-Mar-05 22:49
leppie12-Mar-05 22:49 
GeneralRe: lexical analyzer Pin
WaleedH13-Mar-05 5:32
WaleedH13-Mar-05 5:32 
GeneralLogging all Incoming and Outgoing Data on specified port Pin
Gustav Paul12-Mar-05 7:49
sussGustav Paul12-Mar-05 7:49 
GeneralRe: Logging all Incoming and Outgoing Data on specified port Pin
Dave Kreskowiak12-Mar-05 17:55
mveDave Kreskowiak12-Mar-05 17:55 
Questionhow to communicate with a web site Pin
Mohsen Saad12-Mar-05 6:48
Mohsen Saad12-Mar-05 6:48 
AnswerRe: how to communicate with a web site Pin
Judah Gabriel Himango12-Mar-05 6:54
sponsorJudah Gabriel Himango12-Mar-05 6:54 
GeneralRe: how to communicate with a web site Pin
Mohsen Saad12-Mar-05 7:06
Mohsen Saad12-Mar-05 7:06 
GeneralRe: how to communicate with a web site Pin
Judah Gabriel Himango12-Mar-05 7:12
sponsorJudah Gabriel Himango12-Mar-05 7:12 
AnswerRe: how to communicate with a web site Pin
Ghazi H. Wadi12-Mar-05 7:44
Ghazi H. Wadi12-Mar-05 7:44 
AnswerRe: how to communicate with a web site Pin
Bahadir Cambel12-Mar-05 23:31
Bahadir Cambel12-Mar-05 23:31 
AnswerRe: how to communicate with a web site Pin
tonaxxl13-Mar-05 5:03
tonaxxl13-Mar-05 5:03 
GeneralRepaint frame Pin
Robske12-Mar-05 6:39
Robske12-Mar-05 6:39 
GeneralRe: Repaint frame Pin
Judah Gabriel Himango12-Mar-05 6:58
sponsorJudah Gabriel Himango12-Mar-05 6:58 
General'fit to page' future when printing HTML document Pin
simcho9912-Mar-05 1:01
simcho9912-Mar-05 1:01 

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.