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

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,
 
G

Guest

Use something like:

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

Chris.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top