Y
Y. Sivaram
I have a strange problem in Windows Mobile 6.5 Acer Neo S200 device. In my
application in the Form closing event, I am showing a message box to get a
user input to decide whether to close the form or not. However in this
device while the message box code is getting executed (I.e. if I step
through the code the closing event and the message box code gets hit), but
it does not wait for the message box input and simply closes the form. The
message box briefly appears for a second and disappears. When I check the
same code in Windows Mobile 5,6 devices or 6.5 emulator it works fine. I do
not have any other Windows Mobile 6.5 device. Hence cannot verify this
behaviour.
Note my window does not have minimise button (it is a OK button) & the
closing event IS firing.
Any ideas?
Code I am using in the close event is
private void Form2_Closing(object sender, CancelEventArgs e)
{
DialogResult UserSelection = MessageBox.Show("Are you sure", "Test",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button2);
if (UserSelection != DialogResult.Yes)
e.Cancel = true;
}
Apologies if it is considered as double posting. I have already posted this
to
http://social.msdn.microsoft.com/Fo.../thread/d17c042d-12e3-4b75-ba6a-409cc7c809a7/
But didn't get any solution.
application in the Form closing event, I am showing a message box to get a
user input to decide whether to close the form or not. However in this
device while the message box code is getting executed (I.e. if I step
through the code the closing event and the message box code gets hit), but
it does not wait for the message box input and simply closes the form. The
message box briefly appears for a second and disappears. When I check the
same code in Windows Mobile 5,6 devices or 6.5 emulator it works fine. I do
not have any other Windows Mobile 6.5 device. Hence cannot verify this
behaviour.
Note my window does not have minimise button (it is a OK button) & the
closing event IS firing.
Any ideas?
Code I am using in the close event is
private void Form2_Closing(object sender, CancelEventArgs e)
{
DialogResult UserSelection = MessageBox.Show("Are you sure", "Test",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button2);
if (UserSelection != DialogResult.Yes)
e.Cancel = true;
}
Apologies if it is considered as double posting. I have already posted this
to
http://social.msdn.microsoft.com/Fo.../thread/d17c042d-12e3-4b75-ba6a-409cc7c809a7/
But didn't get any solution.