Results 1 to 4 of 4

Thread: messagebox question

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Middle of nowhere
    Posts
    45

    messagebox question

    Hey Everyone,

    Having a MB problem...

    ok, what im looking for basicly. Is a way to create a messagebox with my own messages on the buttons. like Instead of "Abort, retry, Cancel" be able to put "Monkey, dog, Cat" i know how to accomplish the functionality of what i want to do. But i cant have no idea how to get a messagebox with my own messageboxbutton's...

    If this cant be done, my alternative is to create a new form with the buttons i want on them. But the problem with that is, i need it to send back information to frmMain. If its not possible to define my own button messages, could anyone tell me how to send variable data from frm2 back to frmmain after a button is clicked on frm2?

    example:

    FrmMain has a label: lblanimal. and a button, GetAnimal. You click button, it opens up a new form, with the choices Dog, Cat, owl, Wolf, Turtle. You click one of those. it stores the result in a variable, then returns that variable to frmmain, in which i can set lblanimal.text = *insert variablename for animals here*


    Would appriciate any assistance that could be offered. Thanks a bunch!

    ---Flac
    Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.

  2. #2
    Fanatic Member
    Join Date
    May 2002
    Posts
    746
    Open your custom dialog form with .ShowDialog() instead of .Show(). On your custom form set the DialogResult property for your respective buttons - you can then capture the result as normal on your main form.

  3. #3
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112
    about the getter thing, create a property...

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Shadow the Showdialog() function so it returns your own data type rather than Dialog result.

    Then overload the New() constructor to take arguments that represent the messages you want for your buttons.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width