Custom MessageBox

G

Guest

Hi all,
I want to create a customized MessageBox. In .net the MessageBox
class will wrap the SDK MessageBox. And it has a private constructor. So
surely I cant derive from the MessageBox class.
So I tried deriving the messageBox class from System.Object and the
static methods like MB.Show() calls the CreateWindow() of another calls which
is derived from NativeWindow. but with static methods one cant call the
createWindow and pass the Handle to it.
I'm fixed here. is deriving it from the form is a option or what
else are the possibilities i can do it.
please respond if anyone know about this,
thank you,
Harry
 
C

Cor Ligthert

Harry,

Is that not a lot of work, a messagebox itself is nothing more than a
derived form where from the grip and the the controlbox are set to false,
the maximumsize and minimusize are set and some more of those things. So
when you derive it from form it is very easy to do.

And use than to show it with mymessagebox.showdialog (or whatever as a
method).

I hope this helps?

Cor

"Harry_Crow"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top