<div>What about SW_RESTORE ?</div>
<div>&nbsp;</div>
<div>Peter Below's bigger solution to this in his posting suggests this can give all sorts of control overn such a prog.</div>
<div>&nbsp;</div>
<div>&quot;The other option is to use CreateProcess to start the program. That gives <br>you (among other goodies) the threadID of the programs main thread. Which <br>you can then use with EnumThreadWindows to find the window(s) of that 
<br>thread. Go to <a href="http://www.deja.com/">http://www.deja.com</a>, <a href="http://www.mers.com/searchsite.html">http://www.mers.com/searchsite.html</a>, <br><a href="http://www.tamracka.com/">http://www.tamracka.com
</a> or <a href="http://developers.href.com/">http://developers.href.com</a> and search the <br>newsgroups for the API functions mentioned above for examples. &quot;<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 30/05/06, <b class="gmail_sendername">Phil Scadden</b> &lt;<a href="mailto:p.scadden@gns.cri.nz">p.scadden@gns.cri.nz</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Having some fun with Shellexecute. I am using it from my program to<br>get another application open one of its documents. No problem there.
<br>However, if the application is ALREADY running, then the document<br>is opened within the existing application. Hmm. Not so good but no<br>real problem. Now the real problem. If the application is covered by another<br>
window, this it is not brought to top and its not obvious that the document<br>has been opened all. It looks like my application is not doing its job.<br><br>I am calling shellexecute with shownormal. Any way to force the application
<br>to the top short of scanning the process list or findwindow and calling<br>setwindowpos on that instance?<br><br>----------------------------------------------------------<br>Phil Scadden, Institute of Geological and Nuclear Sciences
<br>764 Cumberland St, Private Bag 1930, Dunedin, New Zealand<br>Ph +64 3 4799663, fax +64 3 477 5232<br><br>_______________________________________________<br>Delphi mailing list<br><a href="mailto:Delphi@ns3.123.co.nz">
Delphi@ns3.123.co.nz</a><br><a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><br></blockquote></div><br>