Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
Generalpopulating an input of file type textbox Pin
CucumberPickles10-Mar-03 12:24
CucumberPickles10-Mar-03 12:24 
GeneralRe: populating an input of file type textbox Pin
James T. Johnson10-Mar-03 17:59
James T. Johnson10-Mar-03 17:59 
GeneralA simple Form OK button question Pin
DionChen10-Mar-03 11:36
DionChen10-Mar-03 11:36 
GeneralRe: A simple Form OK button question Pin
Gogou10-Mar-03 12:02
Gogou10-Mar-03 12:02 
GeneralRe: A simple Form OK button question Pin
DionChen10-Mar-03 16:48
DionChen10-Mar-03 16:48 
GeneralRe: A simple Form OK button question Pin
James T. Johnson10-Mar-03 18:07
James T. Johnson10-Mar-03 18:07 
GeneralRe: A simple Form OK button question Pin
Zek3vil11-Mar-03 7:01
Zek3vil11-Mar-03 7:01 
GeneralRe: A simple Form OK button question Pin
LongRange.Shooter11-Mar-03 7:33
LongRange.Shooter11-Mar-03 7:33 
In the parent form:

<br />
  GetMyData diagInfo = new GetMyData();<br />
  if (diagInfo.ShowDialog() == DialogResult.Cancel)<br />
  {<br />
        cancel logic<br />
  }<br />
  else<br />
  {<br />
         doit<br />
  }<br />


The dialog form:

<br />
  public GeMyData<br />
  {<br />
  }<br />
  public string GiveMeInfoOne<br />
  {<br />
     get<br />
     {  return info1.Text; }<br />
  }<br />
  public string GiveMeInfoTwo<br />
  {<br />
     get<br />
     {  return info2.Text; }<br />
  }<br />
  private void button1_Click(Object sender, EventArgs e)<br />
  {<br />
     if (info1.Text == "" or info2.Text == "")<br />
     {<br />
       MessageBox.Show("You really must enter data in my text boxes or I<br />
          will never go away and I will haunt you the rest of your days");<br />
     }<br />
     else<br />
     {<br />
         this.DialogResult = DialogResult.OK;<br />
         this.Close();<br />
         return;<br />
     }<br />
   }<br />


Voila -- your dialog never closes until you have a good bit of data in each box and you actually execute a return. Cool | :cool:

_____________________________________________
The world is a dangerous place.
Not because of those that do evil,
    but because of those who look on and do nothing.

QuestionBackground color on a TreeView checkbox? Pin
se99ts10-Mar-03 10:35
se99ts10-Mar-03 10:35 
QuestionDataSet bind to datagrid, how to flush or reject changes on Form.Closing ? Pin
Chris Richner10-Mar-03 10:25
Chris Richner10-Mar-03 10:25 
AnswerRe: DataSet bind to datagrid, how to flush or reject changes on Form.Closing ? Pin
leppie10-Mar-03 10:39
leppie10-Mar-03 10:39 
GeneralRe: DataSet bind to datagrid, how to flush or reject changes on Form.Closing ? Pin
Chris Richner10-Mar-03 22:48
Chris Richner10-Mar-03 22:48 
GeneralRe: DataSet bind to datagrid, how to flush or reject changes on Form.Closing ? Pin
ed2d11-Mar-03 21:25
ed2d11-Mar-03 21:25 
GeneralRe: DataSet bind to datagrid, how to flush or reject changes on Form.Closing ? Pin
Chris Richner12-Mar-03 5:08
Chris Richner12-Mar-03 5:08 
QuestionGet xpath of current Node? Pin
Bog10-Mar-03 10:00
Bog10-Mar-03 10:00 
AnswerRe: Get xpath of current Node? Pin
Christian Graus10-Mar-03 10:08
protectorChristian Graus10-Mar-03 10:08 
GeneralDrawing my own tab... Pin
Gogou10-Mar-03 9:35
Gogou10-Mar-03 9:35 
GeneralRe: Drawing my own tab... Pin
leppie10-Mar-03 9:50
leppie10-Mar-03 9:50 
GeneralRe: Drawing my own tab... Pin
Gogou10-Mar-03 10:12
Gogou10-Mar-03 10:12 
Question3 State Treeview checkboxes? Pin
vlusardi10-Mar-03 6:25
vlusardi10-Mar-03 6:25 
AnswerRe: 3 State Treeview checkboxes? Pin
Stephane Rodriguez.10-Mar-03 9:41
Stephane Rodriguez.10-Mar-03 9:41 
GeneralRecursive File Search Pin
Mark Sanders10-Mar-03 5:42
Mark Sanders10-Mar-03 5:42 
GeneralRe: Recursive File Search Pin
Mazdak10-Mar-03 7:57
Mazdak10-Mar-03 7:57 
GeneralRe: Recursive File Search Pin
leppie10-Mar-03 10:02
leppie10-Mar-03 10:02 
GeneralRe: Recursive File Search Pin
Mazdak11-Mar-03 6:59
Mazdak11-Mar-03 6:59 

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.