• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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