I want to add a link, when the message appears, there is an ok button, when they click it will lead to the target URL link, how do I do it, can you help me
Public Shared Sub NewsInfo()
MessageBox.Show("this message will appear")
End Sub
I have tried but error
If MessageBox.Show(Program."Demo version", MessageBoxButtons.YesNo) = DialogResult.Yes Then
New Process() With { .StartInfo = { .FileName = "http://www.google.com" } }.Start()
End If
MessageBoxclass just displays a message. If you want more than that, you need to create your own form and display that. Internally,MessageBox.Showjust creates a form with the appropriate controls, callsShowDialogon it and then returns the appropriateDialogResult. You can do the same with your own form.If MessageBox.Show(Program."Demo version", MessageBoxButtons.YesNo) = DialogResult.Yes Then New Process() With { .StartInfo = { .FileName = "http://www.google.com" } }.Start() End IfProgram."Demo version". What exactly are you trying to achieve there? What isProgramand what do you think."Demo version"should do there?Process.Start(url). Anything else is complicating things unnecessarily. I doubt that has anything to do with your issue though, as indicated above.