1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| SHELLEXECUTEINFO exe;
void __fastcall TForm1::Button4Click(TObject *Sender)
{
exe.cbSize = sizeof(exe);
exe.fMask = SEE_MASK_NOCLOSEPROCESS;
exe.hwnd = NULL;
exe.lpVerb = "open";
exe.lpFile = "http://www.fipradio.fr/player";
exe.lpParameters = NULL;
exe.lpDirectory = NULL;
exe.nShow = SW_SHOW;
exe.hInstApp = NULL;
ShellExecuteEx(&exe);
}
//-------------------------------------------------------------------------
void __fastcall TForm1::Button5Click(TObject *Sender)
{
if(exe.hProcess)
{ TerminateProcess(exe.hProcess,NULL);
CloseHandle(exe.hProcess);
}
} |
Partager