Is it possible to make custom buttons in a message box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slenish
    Contributor
    • Feb 2010
    • 283

    #1

    Is it possible to make custom buttons in a message box?

    Hello everyone,

    I was wondering if its possible to make custom buttons in a message box?

    For example instead of the normal vbOKCancel is there a way to change the buttons to say anything I choose?

    I have a feeling its not possible, but it never hurts to ask.


    Thanks for the help

    slen :D
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #2
    Hello Slenish,

    I don't believe you can.

    Usually to make a custom dialoge box you can just create a new form and set it to Modal and remove all the navigation buttons etc. and put whatever you want.

    cheers,

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      Mshmyob is absolutely correct. That is the situation, as well as the typical solution to it.

      Comment

      • slenish
        Contributor
        • Feb 2010
        • 283

        #4
        Thank you mshmyob, and NeoPa,

        Yeah i had a feeling that might be the answer.

        thanks again :D

        Comment

        • pod
          Contributor
          • Sep 2007
          • 298

          #5
          You can always cheat ... instead of using a message box why don't you call a form where you can write whatever you want on your buttons, it looks better too ;)


          oh, I just noticed that mshmyob answered that ... Damn he's good!
          Last edited by pod; Dec 7 '10, 07:39 PM. Reason: did not read everything on the page

          Comment

          • patjones
            Recognized Expert Contributor
            • Jun 2007
            • 931

            #6
            Hi,

            I see that this question is already answered to your satisfaction (and it is the best approach to your problem); however I would point out that through the use of some Windows API calls what you originally asked might be possible. I have seen similar tasks accomplished but it requires a great deal of esoteric code (code that I certainly don't understand), and definitely requires more effort than simply designing your own modal form.

            Just my $0.02!

            Pat

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              As a side note, you can 'Spruce Up' your Message Boxes to a limited extent.

              Comment

              Working...