How to: Use dialogbox to control close button on controlbox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use a dialogbox with YES / NO buttons to control the events
that fire when the user clicks the OK button on the pocket pc ControlBox (The
equivalent of a close button on normal windows apps). The purpose being to
confirm if the user wants to close the form or not.

However, it seems that the only event the OK button fires is the Closing
event. What other event shuold i capture or how can this be done w/ Closing?

Thanks,
 
Use something like:

private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
// logic here to determine users requirements
e.Cancel = true;
}

Chris.
 
easy enough. thanks!

Chris Ballard said:
Use something like:

private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
// logic here to determine users requirements
e.Cancel = true;
}

Chris.
 
Back
Top