I fully agree.
But since you classified me as only capable of answering simple questions(which is all I do and can do in fact) I (with my simple mind) thought you where able to figure out all the rest for yourself. Correct me if I am wrong.:|
I should say: overide the Show method of the MessageBox class.
In the overide play the sound(async), then Show the messagebox.
according to this guy i cant override messagebox.show(), why?
This is old, nevertheless, you can create a derived MessageBox class, but the Show method of the MessageBox class is static. Therefore it's possible to override the MessageBox class, but you won't be able to override the Show method.
So, the following line will work.
public static MyMessageBox : MessageBox
but you won't be able to do this:
public static override MessageBoxResult Show( string messageBoxText )
Therefore, it is possible to override the messagebox class, but the one function that is acutally useful can not be overriden.
You could also just create a class called MessageBox in your application with static Show methods that match the framework MessageBox class. You could then use namespaces to switch between your MessageBox class and the framework MessageBox class.
public static MessageBox
public static MessageBoxResult Show( string messageBoxText )
return System.Windows.Forms.MessageBox.Show( messageBoxText );
Any of the other suggestions on this page should also suffice.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...