<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66299</guid>
        <pubDate>Wed, 12 Mar 2003 17:21:15 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66299</link>
        <description><![CDATA[Song: 2peter<br>C WinExec'ом сложнее.<br>Надо определить хэндл программы. Везде здесь есть условности. Например, если программа видима и активна и запускается с фокусом ввода (обычно) - значит GetForeGroundWindow. Если нет, то всё зависит от конкретных условий.<br>Если делать всё по уму, то здесь также куча условностей. Надо запускать чтобы получить хэндл процесса или потока. Это можно сделать через CreateProcess() или ShellExecuteEx() Далее надо во всех потоках этого процесса найти главное окно и послать ему WM_CLOSE. Так можно закрыть программу. Но самое сложное, найти нужное окно. Точного диагноза что именно это окно главное - нет.]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66297</guid>
        <pubDate>Wed, 12 Mar 2003 17:10:25 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66297</link>
        <description><![CDATA[FEV: <span class="tag-color tag-color-named" data-value="red" style="color: red">[Удалено модератором]<br>Новый вопрос - новая тема.</span>]]></description>
        <author>FEV</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66295</guid>
        <pubDate>Wed, 12 Mar 2003 16:53:30 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66295</link>
        <description><![CDATA[Was: Ьожет лучше через процессы? Примерно так<br><br>var<br> &nbsp; fSI &nbsp;: TStartupInfo;<br> &nbsp; fPI &nbsp; : TProcessInformation;<br> &nbsp; CommandString &nbsp; : string;<br>.............<br>Вызов:<br><br>CreateProcess(Nil, PChar(CommandString), Nil, Nil, False, CREATE_NEW_CONSOLE, Nil, Nil, FSi, FPi);<br><br>Завершение:<br><br> &nbsp; &nbsp; TerminateProcess(fPI.hProcess, 0);<br> &nbsp; &nbsp; CloseHandle(fPI.hThread);<br> &nbsp; &nbsp; CloseHandle(fPI.hProcess);<br>]]></description>
        <author>Was</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66293</guid>
        <pubDate>Wed, 12 Mar 2003 14:17:36 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66293</link>
        <description><![CDATA[peter: это всё хорошо. а как сделать так:<br><br>нажали на кнопку с WinExec(... , SW_SHOW);<br>какой код должен быть у второй кнопки, которая должна закрыть это, только что открытое, окно?]]></description>
        <author>peter</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66291</guid>
        <pubDate>Wed, 12 Mar 2003 04:03:33 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66291</link>
        <description><![CDATA[andrey_pst: BOOL TerminateProcess(<br> &nbsp; &nbsp;HANDLE hProcess, &nbsp; &nbsp; &nbsp;// handle to the process <br> &nbsp; &nbsp;UINT uExitCode  &nbsp; &nbsp; &nbsp;// exit code for the process &nbsp;<br> &nbsp; );]]></description>
        <author>andrey_pst</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66290</guid>
        <pubDate>Tue, 11 Mar 2003 21:18:54 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66290</link>
        <description><![CDATA[peter: конечно...]]></description>
        <author>peter</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66287</guid>
        <pubDate>Tue, 11 Mar 2003 19:19:22 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66287</link>
        <description><![CDATA[x2er0: Что за &quot;черное окно&quot;? Консоль что ли?]]></description>
        <author>x2er0</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66286</guid>
        <pubDate>Tue, 11 Mar 2003 18:50:16 +0000</pubDate>
        <title>о WinExec()</title>
        <link>https://forum.sources.ru/index.php?showtopic=5847&amp;view=findpost&amp;p=66286</link>
        <description><![CDATA[peter: допустим мы открыли &quot;черное&quot; окно, при помощи WinExec. Можно потом программно его закрыть? и как? ::)]]></description>
        <author>peter</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	