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

C#

 
Questionhow to catch keydown event in datagridview Pin
han275419-Oct-09 2:31
han275419-Oct-09 2:31 
AnswerRe: how to catch keydown event in datagridview Pin
Henry Minute19-Oct-09 4:20
Henry Minute19-Oct-09 4:20 
GeneralRe: how to catch keydown event in datagridview Pin
han275419-Oct-09 13:21
han275419-Oct-09 13:21 
QuestionCheck if MessageBox is on Pin
tamir90119-Oct-09 1:04
tamir90119-Oct-09 1:04 
AnswerRe: Check if MessageBox is on Pin
Christian Graus19-Oct-09 1:07
protectorChristian Graus19-Oct-09 1:07 
GeneralRe: Check if MessageBox is on Pin
tamir90119-Oct-09 1:16
tamir90119-Oct-09 1:16 
GeneralRe: Check if MessageBox is on Pin
Christian Graus19-Oct-09 1:44
protectorChristian Graus19-Oct-09 1:44 
GeneralRe: Check if MessageBox is on Pin
Russ-T19-Oct-09 2:44
Russ-T19-Oct-09 2:44 
tamir901 wrote:
But if i'll stop the timer i don't think i can start it again,
can i?

Yes, see below.

tamir901 wrote:
and how i can check if the user press OK, with the Dialog Result?

Yes, just get back the DialogResult and compare it to one of the values in the DialogResult enum.

I don't mean to be doing your homework for you, but sometimes seeing it in code can make it easier to understand:

if (myCondition) {
    //stop the timer
    timer1.Stop();

    //display your message box
    DialogResult result = MessageBox.Show("here is my message", "caption", MessageBoxButtons.OKCancel);

    //did the user click ok?
    if (result == DialogResult.OK) {
        //yes, so do something
    } else {
        //no, so do something else
    }

    //start your timer again
    timer1.Start();
}


Christian Graus wrote:

or you'd have to write your own message box class so you can set some sort of flag.
tamir901 wrote:
Can I overrite it?



You could, but it's a lot easier just to follow Christian's first suggestion and stop and start the timer.
QuestionPushing Code to a Server Pin
Yonathan111118-Oct-09 22:56
professionalYonathan111118-Oct-09 22:56 
AnswerRe: Pushing Code to a Server Pin
Giorgi Dalakishvili18-Oct-09 23:05
mentorGiorgi Dalakishvili18-Oct-09 23:05 
AnswerRe: Pushing Code to a Server Pin
Christian Graus18-Oct-09 23:34
protectorChristian Graus18-Oct-09 23:34 
QuestionSave and retrieve an Image from folder Pin
SAINTJAB18-Oct-09 22:42
SAINTJAB18-Oct-09 22:42 
AnswerRe: Save and retrieve an Image from folder Pin
Md. Marufuzzaman18-Oct-09 23:07
professionalMd. Marufuzzaman18-Oct-09 23:07 
QuestionPowerSheel Pin
satsumatable18-Oct-09 22:08
satsumatable18-Oct-09 22:08 
AnswerRe: PowerSheel Pin
Christian Graus18-Oct-09 22:34
protectorChristian Graus18-Oct-09 22:34 
QuestionOdbcDataReader Pin
viliam18-Oct-09 21:22
viliam18-Oct-09 21:22 
AnswerRe: OdbcDataReader Pin
OriginalGriff18-Oct-09 22:24
mveOriginalGriff18-Oct-09 22:24 
GeneralRe: OdbcDataReader Pin
viliam19-Oct-09 4:05
viliam19-Oct-09 4:05 
QuestionLoading a form.... Pin
Dawit Kiros18-Oct-09 19:58
Dawit Kiros18-Oct-09 19:58 
AnswerRe: Loading a form.... Pin
Christian Graus18-Oct-09 20:01
protectorChristian Graus18-Oct-09 20:01 
AnswerRe: Loading a form.... Pin
Md. Marufuzzaman18-Oct-09 23:04
professionalMd. Marufuzzaman18-Oct-09 23:04 
QuestionAlter the size of the Crystal Reports which displays more than 10 fields horizontally in it ? Pin
Subin Alex18-Oct-09 18:39
Subin Alex18-Oct-09 18:39 
QuestionProblem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
WhiteWolf1918-Oct-09 17:19
WhiteWolf1918-Oct-09 17:19 
AnswerRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
N a v a n e e t h18-Oct-09 17:27
N a v a n e e t h18-Oct-09 17:27 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
WhiteWolf1918-Oct-09 17:34
WhiteWolf1918-Oct-09 17: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.