Click here to Skip to main content
15,888,006 members
Home / Discussions / C#
   

C#

 
AnswerRe: Hello Guys Pin
CoderForEver8-Aug-09 9:32
CoderForEver8-Aug-09 9:32 
QuestionText Splitting Pin
iNutR4-Aug-09 22:01
iNutR4-Aug-09 22:01 
AnswerRe: Text Splitting Pin
stancrm4-Aug-09 22:06
stancrm4-Aug-09 22:06 
GeneralRe: Text Splitting Pin
iNutR4-Aug-09 22:08
iNutR4-Aug-09 22:08 
GeneralRe: Text Splitting Pin
Mycroft Holmes4-Aug-09 22:22
professionalMycroft Holmes4-Aug-09 22:22 
Questionwho has digital color management code in c#? Pin
sudan1234-Aug-09 21:39
sudan1234-Aug-09 21:39 
AnswerRe: who has digital color management code in c#? Pin
Christian Graus4-Aug-09 22:15
protectorChristian Graus4-Aug-09 22:15 
QuestionControl-Break in C# console application Pin
mSh19854-Aug-09 21:12
mSh19854-Aug-09 21:12 
Hello,
I've written a small console application for me and some collegues to use, it contains a lot of commands,
all of which we use on a daily basis. To prevent also having to open a windows commandprompt besides my
own console, i also included the ping command in my console (started with a process.start) and the
results are written in my console.

All good and well, but when i keep pinging (ping hostname /t) i have to be able to use ctrl-c and
ctrl-break without my console exiting. So i implemented the following in my code:

static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
        {
            if (e.SpecialKey == ConsoleSpecialKey.ControlC)
            {
                e.Cancel = true;
            }
            else 
            {
                //e.Cancel = true;   throws an error
                dowhile();
            }
        }


the function dowhile() calls a function where i read the input as long as the user doesnt type "exit".
I couldnt cancel the event when ctrl-break is pressed, so i guessed i should just call my dowhile
function again. Everything works fine, except when i try to close my application typing exit, or pressing
the close button. It takes 3 to 5 seconds before my console closes. This only happens when i pressed
Ctrl-Break before.

Am i doing something wrong, or is there a better way to prevent Ctrl-Break from exiting my console?
My console just cant close when i press Ctrl-Break because then i can't see my temporary ping statistics
anymore.
Any thoughts? Thanks in advance.
Questionfileupload controll of asp Pin
RajaAhmed4-Aug-09 20:58
RajaAhmed4-Aug-09 20:58 
AnswerRe: fileupload controll of asp Pin
stancrm4-Aug-09 21:13
stancrm4-Aug-09 21:13 
Questionservice startupType Pin
arkiboys4-Aug-09 20:17
arkiboys4-Aug-09 20:17 
AnswerRe: service startupType Pin
stancrm4-Aug-09 20:40
stancrm4-Aug-09 20:40 
GeneralRe: service startupType Pin
arkiboys4-Aug-09 21:26
arkiboys4-Aug-09 21:26 
QuestionLoading 2048K values to textbox from stringbuilder object... Pin
spalanivel4-Aug-09 20:00
spalanivel4-Aug-09 20:00 
AnswerRe: Loading 2048K values to textbox from stringbuilder object... Pin
stancrm4-Aug-09 20:26
stancrm4-Aug-09 20:26 
GeneralRe: Loading 2048K values to textbox from stringbuilder object... Pin
spalanivel4-Aug-09 20:40
spalanivel4-Aug-09 20:40 
AnswerRe: Loading 2048K values to textbox from stringbuilder object... Pin
spalanivel4-Aug-09 20:34
spalanivel4-Aug-09 20:34 
GeneralRe: Loading 2048K values to textbox from stringbuilder object... Pin
stancrm4-Aug-09 20:35
stancrm4-Aug-09 20:35 
AnswerRe: Loading 2048K values to textbox from stringbuilder object... Pin
stancrm4-Aug-09 20:37
stancrm4-Aug-09 20:37 
GeneralRe: Loading 2048K values to textbox from stringbuilder object... Pin
spalanivel4-Aug-09 22:35
spalanivel4-Aug-09 22:35 
GeneralRe: Loading 2048K values to textbox from stringbuilder object... Pin
stancrm4-Aug-09 22:54
stancrm4-Aug-09 22:54 
QuestionSQL 2005 connection failed Pin
picasso24-Aug-09 19:51
picasso24-Aug-09 19:51 
AnswerRe: SQL 2005 connection failed Pin
ammar_shaker4-Aug-09 20:53
ammar_shaker4-Aug-09 20:53 
QuestionLicensing for windows application Pin
nilam24774-Aug-09 19:31
nilam24774-Aug-09 19:31 
AnswerRe: Licensing for windows application Pin
Christian Graus4-Aug-09 19:34
protectorChristian Graus4-Aug-09 19:34 

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.