|
-
Dec 27th, 2002, 05:22 AM
#1
How to make the ShowDialog method return a custom object
Everyone else probably already knows this but I just needed a form to return an object as a result and so I found a way to do it. Before I've used delegates to call a method when the form was closing or used a ByRef variable, however the delegate isn't ideal for most situations and the ByRef sometimes didn't work. So this is an example of Shadowing the ShowDialog method to return your own object instead of DialogResult. I hope someone finds it useful. You could also use this method for a custom MsgBox which came up here not too long ago.
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
|