c# - Can I set ShowDialog() to not be topmost? -


Is there a way that I can set a ShowDialog () to not be at the top? I have seen all related SO questions, and no one enough does not match my situation.

What I do is open a new WinForm from a Data Grid View button column. This new look pulls information from some SQLite tables and allows the user to add information to that line that was clicked on the button .

I open WinForm using the code given below. I use the ShowDialog () method so that I can tell that the user saves information or cancels the information in the form.

  Pay_Bill_Window paywindow = new Pay_Bill_Window (getClickedRowID); If (paywindow.ShowDialog () == DialogResult.OK) {FillPendingPaymentDataGrid (dbAccess.GetPendingBills ()); }  

I do this so I can tell that I need to reload the information in the DataGrade view.

The information that fills the user in the window can be from other sources, like a web browser, the form is not ideal to be at the top of all applications.

Is there any way that I can stop the window from being at the top of all applications (the fine of Windows is fine at the top of my series), or a user tells that one user clicks on another button (Basically, using paywindow.Show () and looking for a different type of return)?

Use something like this: form1:

<0> Private Zero Button 1_Click (Object Sender, EventEurges E) {Form 2 FM = New Form 2 (); Frm.Show (); Frm.FormIsClosing + frm_FormIsClosing; } Zero frm_FormIsClosing (Object Sender, DialogResult RSL) {if (rsl == System.Windows.Forms.DialogResult.Yes) MessageBox.Show ("We Found"); }

form2:

  Public representative Zero IsClosing (Object Sender, DialogResult RSL); Public Event Isiclosing FormIsClosing; Private Zero form 2_Formclosed (Object Sender, FormClideAventErgus E) {Formis Clausing (this, System.indo.form.nologalsalt.Yes); }  

Then you close Form 2, closing form IIS and you can hold it from 1;)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -