As Ravi said: "you can't."
All the substitute customizable Message Boxes you'll find, including the ones linked to in this thread, use a Form, and use 'ShowDialog to display the Form for very good reasons, including:
1. native WinForms Dialogs do some complex stuff to suspend the Message Pump to the Application's other windows while they hog the UI Events. Forms shown modally do the same: to reproduce that functionality you will have to have teeth pulled. Example: [
^]. Trust me you don't want to go there.
2. You can use the DialogResult Enumeration value returned when a Form shown modally closes.
3. The convenience of having Buttons you can set the DialogResult property of in the Property Browser at design-time.
But, I'd encourage you to think about the fact that the way a Dialog looks-and-feels, and behaves, is something that Windows users are socialized to; the set of visual cues, and typical Control decorations ("Close," "Save," "Cancel," etc.) have
meaning.
I suggest you consider that if the purpose of your Dialog UI is not similar to standard Win Dialogs, you reconsider the value of "going modal." If you really need to display another Form, you can display it "semi-modal" by setting its 'TopLevel and 'TopMost properties as needed.
But, if you gotta go modal, then I'd suggest deliberately making the look-and-feel of your Form shown modally different from the standard Dialogs, and make sure its design communicates to end-users its purpose. ... Quite likely that
is your goal at this time :)
If you really desire a code example of using a secondary Form modally, just ask.