Launching A Web Page In A Browser


Opening file in Notepad

	using namespace System::Diagnostics;

	ProcessStartInfo ^startInfo = gcnew ProcessStartInfo();
	startInfo->FileName = "C:\\Windows\\notepad.exe";
	startInfo->Arguments = "\"" + Path::GetDirectoryName(Application::ExecutablePath) + "\\SomeDocName.Config\"";

Launching Another Application From C++

using namespace System::Diagnostics;

If you need to pass arguments then use

	ProcessStartInfo ^startInfo = gcnew ProcessStartInfo();
	startInfo->FileName = "C:\\Program Files\\IndigoVision\\Control Center\\ControlCenter.exe";
	startInfo->Arguments = "-username adampulley -video_display_mode video_panes_only";

Also see:
Shell Execute

Launching and Closing Another Application From C++

Create Class

	Process^ MyProcess;
Open Ap

	MyProcess = gcnew Process();
	MyProcess->StartInfo->FileName = "C:\\Program Files\\IndigoVision\\ControlCenter.exe";
	MyProcess->StartInfo->Arguments = "-username adampulley -video_display_mode video_panes_only";
Close Ap

	if (MyProcess != nullptr)
		if (!MyProcess->HasExited)
		MyProcess = nullptr;

Other resources for fingding and closing other aps:

We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.