Questions tagged [dialogresult]

DialogResult is returned by dialogs after dismissal. It indicates which button was clicked on the dialog by the user. It is used with the MessageBox.Show method. It is a value. It can be switched upon and tested in an if-statement.

DialogResult is returned by dialogs after dismissal. It indicates which button was clicked on the dialog by the user. It is used with the MessageBox.Show method. It is a value. It can be switched upon and tested in an if-statement.

97 questions
0
votes
1 answer

MsgBox Appears Multiple Times

I have a script like that, once user clicks on the radiobutton, messagebox do appear. But when i click da "No" dialogresult, messagebox appears twice. I dunno why does that happen. I don't want it to display twice times. I know there must be a so…
Can
  • 1
  • 1
0
votes
1 answer

DialogResult Error in a Modal Window

Okay, this one will be a fun one. I am building an authentication flow in my application. My application will open a modal window with a webbrowser element and browse to the auth URL. Then it wil monitor the URL changes of the webbrowser element for…
Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78
0
votes
1 answer

Reentering Datarow in DataTable

Hello everyone I write a code using VC#2008 to allow the user to enter many DataRows sequntially using an index to dataTable as he needs using yes/no dialogresult. firstly the the user enter his data using textboxes and comboboxes using a…
Abu-hatim
  • 5
  • 5
0
votes
2 answers

How to return other values from from show dialog method?

I have a winform in which I call this method: frmIntegrationConfig frm = new frmIntegrationConfig(); DialogResult res = frm.ShowDialog(); The res is always returned as "Canceld". how can I change it according to if the user click "Save" button o r…
Liran Friedman
  • 4,027
  • 13
  • 53
  • 96
0
votes
0 answers

WPF ShowDialog DialogResult

I am working on a WPF desktop application, which has screen-lock feature that shows the log-in dialog after application is inactive for some time. Everything works great until user walks away from the computer and there's modal dialog (other than…
Ming
  • 141
  • 9
0
votes
4 answers

how to find out the number of pages of the pdf file that user selects in OpenFileDialog in c#?

Hi from Afghanistan I am developing a desktop application that sends and recieve fax using a soap message and I need to know the number of pages of the pdf file the user wants to fax.
jafaritaqi
  • 578
  • 7
  • 14
0
votes
3 answers

Returning a dialogResult from method to use in another. c#

I will try and explain the best I can. I am using a class InputBox and using a method shutownTime class InputBox { public static DialogResult shutdownTime(string title, string promptText, ref string value) { and I am returning value…
0lzi
  • 47
  • 5
0
votes
2 answers

Customizing Dialogresult MessageBox with user defined MessageBoxButton

I wan to create a DialogResult MessageBox with my own specified labels on the buttons. I am aware of coding DR MessageBox with YesNo option buttons.
Shaivya Sharma
  • 137
  • 1
  • 3
  • 14
0
votes
4 answers

Forms are not displayed - program.cs

I tried something like that : Start a Form as dialog and ask user about warranty If users click OK, Form is returning DialogResult.OK Form1 is starting from program.cs That is the code of my program.cs : Application.EnableVisualStyles(); …
TN888
  • 7,659
  • 9
  • 48
  • 84
0
votes
3 answers

MessageBox not providing expected DialogResult

I have a simple OK/Cancel DialogResult instance within my form: MessageBox.Show("Number of records affected:" + numberOfRecordsroll + " Please check the data is correct before proceeding:", "Please validate your changes",…
JsonStatham
  • 9,770
  • 27
  • 100
  • 181
0
votes
1 answer

Check if File exists, then Retry

I have a function which checks for the existance of a file (return file.exists(file)). If it does not exist, then I display an error message with options Abort, Retry, Ignore. My trouble is I can't get it to retry. I have tried putting the code to…
NapkinBob
  • 632
  • 7
  • 19
0
votes
3 answers

MessageBox & Dialogs on XNA (C#)

I'm having the following code as part of my XNA game: private void gameOver() { if (!m_IsGameOver) { string message = String.Format("GAME OVER!!!{0}Your score is: {1}", …
Inbali
  • 107
  • 1
  • 7
0
votes
1 answer

Get the result of a PrintDialog

Okay, in my program I am showing a printDialog and I want to be able to know if the user clicks the print button, or the cancel button. In all the examples online that I've seen, the printDialogs have OK buttons, instead of Print buttons. For…
SuperPrograman
  • 1,814
  • 17
  • 24
0
votes
2 answers

Keeping the parent DialogButton open after the child DialogButton is closed

I'm having a problem in keeping the Parent Form to be opened till I close after using ShowDialog() . I've been trying regarding this but couldn't get. I think there is something simple that I might have been missing. Can you please help me reg…
Sailoosha
  • 193
  • 1
  • 3
  • 14
-1
votes
3 answers

Trouble with Form.DialogResult

private void mnuCustomerAdd_Click(object sender, EventArgs e) { CustomerForm frmCust = new CustomerForm("Add A New Customer"); int index = lstCustomers.SelectedIndex; if (index != -1) frmCust.CustomerData =…
Petrus K.
  • 840
  • 7
  • 27
  • 56