Article View: borland.public.cppbuilder.nativeapi
Article #759Re: How to ... ?
From: Jos�
Date: Fri, 25 Jan 2008 13:05
Date: Fri, 25 Jan 2008 13:05
26 lines
2007 bytes
2007 bytes
On Fri, 25 Jan 2008 13:18:52 +0100, Asger Joergensen <junk@Asger-P.dk> wrote in borland.public.cppbuilder.nativeapi: >> >Sure. "Stay on Top" and "input focus" are two separate things. Just >> >because a window is on top does not mean that the user can't still click on >> >other windows. >> >> But how? I can find no functions which force a window on top. And I >> think it is easy to take focus, but not to deny focus. > >SetWindowPos(Form2->Handle, > HWND_TOPMOST, > Form2->Left, // horizontal position > Form2->Top, // vertical position SWP_NOREDRAW | > Form2->Width, // width > Form2->Height, // height > SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE > ); > Thanks. It does stay on top (fine), but it also takes focus (wrong). This means, when I am typing and the form appears unexpectedly (because its Visible property is set), my typing disappears into oblivion. -- Jos�
Technical Details
Message-ID:
<ojnjp3lgum0k2f3v7qnqkuk5rcdkhuba7k@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com> <MPG.2203f216630e254a989a19@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,92f426904d27d7ce X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII From: Jos� <jose@127.0.0.1> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to ... ? Date: Fri, 25 Jan 2008 14:05:12 +0100 Message-ID: <ojnjp3lgum0k2f3v7qnqkuk5rcdkhuba7k@4ax.com> References: <871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com> <MPG.2203f216630e254a989a19@newsgroups.borland.com> X-Newsreader: Forte Agent 4.2/32.1117 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 82.75.73.146 X-Trace: newsgroups.borland.com 1201266323 82.75.73.146 (25 Jan 2008 05:05:23 -0700) Lines: 26 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail