|
-
Jun 9th, 2004, 01:00 PM
#1
Thread Starter
Member
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.
-
Jun 9th, 2004, 01:15 PM
#2
Fanatic Member
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.
-
Jun 9th, 2004, 08:54 PM
#3
Lively Member
about the getter thing, create a property...
-
Jun 10th, 2004, 04:46 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|