Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

Message box format

Hello all
On a very short learning curve with Delphi2005.net.
Can anyone please complete this bit of code to give me a yes, no, cancel button combination within my message box
messagebox.Show('test stuff','test caption');

Many thanks all
0
Paul-Brooks
Asked:
Paul-Brooks
2 Solutions
 
Mohammed NasmanSoftware DeveloperCommented:
 MessageBox.Show( 'Test Stuff','Caption',MessageBoxButtons.YesNoCancel,MessageBoxIcon.Asterisk);
0
 
dKasipovicCommented:
MessageDlg(text:string ,MessageDlgType,[Buttons],0);

MessageDlgType can be mtError, mtInformation, mtConfirmation

Buttons can be combined between the []'s (i.e. [mbYes,mbNo] will show the yes & no button on the message and [mbOK,mbCancel] will show the OK and Cancel buttons on the message, etc...)

I prefer this function cause it gives nicer message dlg, but it is just mine opinion

P.S. for if statements u can use idButton (.ie. if MessageDlg("Are you sure?",mtConfirmation,[mbYes,mbNo],0)=idYes then ....)

Hope this helps :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now