Hi,
this should be really simple but I'm tearing my hair out trying to get it. I'm new to Delphi (I'm a C++ programmer).
I have a dialog with an 'Ok' button on it. I've set the ModalResult property of the button to be mrOk. I've set the dialogs BorderStyle to bsDialog.
Here is some of my code:
buttonSelected := certmgr.ShowModal;
If (CertMgr.ipmCertMgr1.CertHandle <> 0) and (buttonSelected = mrOK) Then Begin
The trouble is that buttonSelected always has the value 2 and mrOk has a value of 1. Why can't I get the dialog to return mrOk when I click the 'Ok' button.
I think Delphi hates me (I think it knows I'm a C++ programmer) and it's doing everything it can to deliberately annoy me (it's the best explanation that I can come with as to why this isn't working).
this should be really simple but I'm tearing my hair out trying to get it. I'm new to Delphi (I'm a C++ programmer).
I have a dialog with an 'Ok' button on it. I've set the ModalResult property of the button to be mrOk. I've set the dialogs BorderStyle to bsDialog.
Here is some of my code:
buttonSelected := certmgr.ShowModal;
If (CertMgr.ipmCertMgr1.CertHandle <> 0) and (buttonSelected = mrOK) Then Begin
The trouble is that buttonSelected always has the value 2 and mrOk has a value of 1. Why can't I get the dialog to return mrOk when I click the 'Ok' button.
I think Delphi hates me (I think it knows I'm a C++ programmer) and it's doing everything it can to deliberately annoy me (it's the best explanation that I can come with as to why this isn't working).