Message box format

Posted on 2005-05-11
Last Modified: 2010-04-05
Hello all
On a very short learning curve with
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
Question by:Paul-Brooks
    LVL 22

    Accepted Solution

     MessageBox.Show( 'Test Stuff','Caption',MessageBoxButtons.YesNoCancel,MessageBoxIcon.Asterisk);
    LVL 2

    Assisted Solution

    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 :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now