Form Loses AcceptButton Property

T

taurin423

I have a windows form that has an OK and Cancel button. I have set
them as the form's AcceptButton and CancelButton respectively. Every
now and again when I run my program I find that they do not work when I
hit Enter and Esc. I go back to Visual Studio and I see that the
AcceptButton and CancelButton properties are no longer set. Any idea
what may be causing this?
 
F

Forrest

Uzytkownik said:
I have a windows form that has an OK and Cancel button. I have set
them as the form's AcceptButton and CancelButton respectively. Every
now and again when I run my program I find that they do not work when I
hit Enter and Esc. I go back to Visual Studio and I see that the
AcceptButton and CancelButton properties are no longer set. Any idea
what may be causing this?

Check your buttons properteis and change for OK_button properties
DialogResult on OK and Cancel_Button on Cancel.
It will be work fine

Forrest
 

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