Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog box button focus

Status
Not open for further replies.

cpmasesa

Programmer
Oct 24, 2002
78
AE
Hello,

I have this code snippet:
...
MessageDlg('Member not allowed to borrow' + #10#13 + 'Allow any way?', mtConfirmation, [mbYes, mbNo], 0)
...

This shows a dialog box with 'YES' as the Focused button. I want "NO" to be the focused button!!

I tried [mbNo, mbYes] but it did not work!!

How can i do this??

TIA

cpmasesa
 
if MessageBox(ProgressStatusForm.Handle, pchar('Message content'), 'Message Title',MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2) = IDYES then

Reference:
thread102-389553

Hope this helps!

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top