Stopping Winform Process

This is a discussion on Stopping Winform Process within the C# Programming forums, part of the General Programming Boards category; I have a winform application that can catch any number of possible errors. I have found though, that once a ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    329

    Stopping Winform Process

    I have a winform application that can catch any number of possible errors. I have found though, that once a messagebox or some other method of displaying the error has been displayed (within a catch block), the program execution continues.

    How can I simply stop complete execution of the program in this event and simply just keep the form open? It is only a one form app with a single thread.

    Thanks.

  2. #2
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    By keeping the form open you mean keeping the form in idle mode?
    From where does your program get input?
    In other words what is the program (that contains a wiform) does in general?

    You could stop execution by not accepting anymore input.

    If you want to freeze the program (for whatever reason) you can do
    Code:
    while (freezed)
     Application.DoEvents();
    this will freeze the program at this point and wait until the variable freezed changes and in the meantime read messages. Assuming you want this in order to check the winform after an error.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    For debugging purposes it would make more sense to set a breakpoint and then attach to your asp.net process (XP: aspnet, Vista/W7: w3wp)
    Here to Deceive, Inveigle, Obfuscate Since 1945

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why isn't the execlp() function doing anything?
    By jsrig88 in forum C Programming
    Replies: 5
    Last Post: 10-12-2009, 11:09 AM
  2. sequenceing or queueing multiple process
    By sv_joshi_pune in forum Windows Programming
    Replies: 1
    Last Post: 08-14-2009, 10:43 AM
  3. Replies: 3
    Last Post: 10-15-2008, 10:24 AM
  4. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 02:43 AM
  5. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 08:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21