<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
I would advise strongly against the use of SwitchToThisWindow API
function in Lazarus. Mainly because it states in the docs: <i>This
function is not intended for general use. It may be altered or
unavailable in subsequent versions of Windows.</i><br>
<br>
Read more in Raymond Chen's blog - The life story of the
SwitchToThisWindow function:<br>
<a
href="https://blogs.msdn.microsoft.com/oldnewthing/20111107-00/?p=9183">https://blogs.msdn.microsoft.com/oldnewthing/20111107-00/?p=9183</a><br>
<br>
Denis<br>
<br>
<br>
<div class="moz-cite-prefix">On 23/05/2017 18:38, Alexey via Lazarus
wrote:<br>
</div>
<blockquote cite="mid:3bf6e786-bce3-a2cf-2392-ab45df45f04e@ya.ru"
type="cite">What do you think about using this rare API [beginning
from WinXP] in LCLIntf fnction? It will make LCL function work
more stable: window will always go to foreground. I used it in
CudaText. It works.
<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/Alexey-T/CudaText/blob/master/app/fix_focus_window.pas">https://github.com/Alexey-T/CudaText/blob/master/app/fix_focus_window.pas</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>