run outside exe in a form
Managed C++/CLI
2
Posts
2
Posters
0
Views
1
Watching
-
how do a person run an outside exe(application) inside a C++ form? like making is a child thread of that form? thanks in advance
I use System::Diagnostics::ProcessStartInfo. Ex below
Diagnostics::ProcessStartInfo ^pInfo; if ( String::IsNullOrEmpty(SoundString) == false ) { if ( System::IO::File::Exists(SoundString) == true ) { pInfo = gcnew Diagnostics::ProcessStartInfo(); pInfo->Verb = "play"; pInfo->FileName = SoundString; pInfo->CreateNoWindow = true; pInfo->UseShellExecute = false; Diagnostics::Process::Start(pInfo); } else LogDebugInfo(String::Format(L"SoundString file {0} does not exists", SoundString)); } else { LogDebugInfo(L"SoundString string was empty"); }
Programmer Glenn Earl Graham Austin, TX