hello!
I have a MessageBox and I want to add a link in the text that is
in it...
can anyone help me understand how to do that?
thanks!!
:wave:
Printable View
hello!
I have a MessageBox and I want to add a link in the text that is
in it...
can anyone help me understand how to do that?
thanks!!
:wave:
Easiest way is to create a small form that looks exactly like a message box. Then you can do anything to it very easily. :)
A MessageBox provides very specific functionality. It will display the title you specify, the message you specify, one a list of predefined icons and certain predefined combinations of predefined buttons. Anything beyond that it is not capable of. If you want anything else then you must implement your own form class, as Rob suggests. It would not be especially difficult to make it behave almost exactly like the MessageBox class.
In my Panel usercontrol I wrote I use a small form that looks and behaves like a message box for the About... link. On the about form I have a hyperlink on it to my site. More and more I am seeing this feature in an about or message box of a program.
It can be done with the API but its a real swine to implement.
not sure how to create link, but here's a crazy idea(that requires API) that may or may not work. Since I don't know the api to create link(hyperlink type), I create a label on the messagebox. So have a function that waits for the messagebox to pop up, then(when it does pop up) create label on the messagebox. Then subclass that label you just created(assuming the whole program that creates the messagebox was created by you); intercept mouse click messages and do whatever you want it to do when it does.