how to inherite a class from System.windows.form.MessageBox?

  • Thread starter Thread starter harvie wang
  • Start date Start date
H

harvie wang

Hi,
I want to add more buttons to messagebox, such as "Apply All".
Can i implement a custom messagebox, inherite from System.Windows.Form.MessageBox?

Best wish,

harvie

2006-1-18
 
Can i implement a custom messagebox, inherite from System.Windows.Form.MessageBox?

No you'll have to inherit from Form and build it from scratch. The
standard MessageBox is provided by the operating system and not
extensible.


Mattias
 
Hello Mattias,

thanks!
No you'll have to inherit from Form and build it from scratch. The
standard MessageBox is provided by the operating system and not
extensible.

Mattias
 
Actually, that is kinda incorrect. You can extend the MessageBox class,

OK if you want to play the nitpicking game you're incorrect too. You
can't extend the MessageBox _class_ since it only has a private
constructor (and should really have been a static class if they had
existed in v1).

Sure you can do all sorts of weird things with the message box dialog
window with Win32 APIs, but just because you can doesn't mean you
should.


Mattias
 

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

Back
Top