Site Search:
Sign in | Join | Help

Getting user response to message box from C#

Last post 08-21-2008 8:27 AM by RamzyEbeid. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-14-2008 9:46 AM

    Getting user response to message box from C#

    Dear All
    I am working with GP10 + Developer Toolkit + VS2005, C#.
    I did some small samples and it is working for me.

    Here is what I want to do:

    When I call “RunValidate()”
    A message box appear asking the user to do something then the user
    have the option Yes/No
    I want to know from the C# Code which button the user press
    FYI: this MSG is GP MSG.

     Thank you

    • 217.139.28.218
  • 07-24-2008 2:10 PM In reply to

    Re: Getting user response to message box from C#

    if (MessageBox.Show("Do you like Cake?","My Msg box", MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes)
       // Do this..... 

    It returns a DialogResult. Here is the table

    Members   	 Description
    Abort 	Return value Abort, usually sent from a button labeled Abort.
    Cancel 	Return value Cancel, usually sent from a button labeled Cancel.
    Ignore 	Return value Ignore, usually sent from a button labeled Ignore.
    No 	Return value No, usually sent from a button labeled No.
    None 	Nothing is returned from the dialog box. The model dialog will continue running.
    OK 	Return value OK, usually sent from a button labeled OK.
    Retry 	Return value Retry, usually sent from a button labeled Retry.
    Yes 	Return value Yes, usually sent from a button labeled Yes.

    Here is the list for the Button list

    Members   	 Description
    AbortRetryIgnore 	Displays Abort, Retry, and Ignore buttons.
    OK 	Displays OK button only.
    OKCancel 	Displays OK and Cancel buttons.
    YesNoCancel 	Displays Yes, No, and Cancel buttons.
    YesNo 	Displays Yes and No buttons.
    RetryCancel 	Displays Retry and Cancel buttons.
     
    Yui
    yuibox.com 
    Filed under:
    • 207.153.60.122
  • 08-21-2008 8:27 AM In reply to

    Re: Getting user response to message box from C#

    thank you for your reply to me

    but i want to get the response from the GP MSG

    "

    When I call “RunValidate()”
    A message box appear asking the user to do something then the user
    have the option Yes/No
    I want to know from the C# Code which button the user press
    FYI: this MSG is GP MSG.

    "

    please advise what to do.

    • 217.139.28.218
Page 1 of 1 (3 items)