How would it be possible to code inside a button that the Browser will open and go to address:
http://www.google.com


private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{


//Code here to go to: http://www.google.com ?


}

Recommended Answers

All 3 Replies

use shellExecute.

Ok, I am trying to do it like this:

ShellExecute(nullptr, "open", "http://www.microsoft.com", nullptr, nullptr, SW_SHOWNORMAL);

The compiler says:
SW_SHOWNORMAL : undeclared identifier
ShellExecute : identifier not found

I am not sure if I need to #include or use any special namespace in order to use ShellExecute or what I could be doing wrong ?

use shellExecute.

All here. Just scroll to the end and read the table of requirements.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.