I've got a problem with making a form topmost in the
application.
I need that a form is shown on top of other forms of my
application, but it should not be on top of other
applications windows.
I tried to use Form.TopMost property, but if I use it
the form appears also on top of other applications even
when the focus is not in my application. Callling
Form.BringToFront() on Focus event also does not work.
Has anybody any ideas on how I can achieve the desired
form behaviour?
Thanks in advance,
A.Simanovsky
There's some sample code in this post:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OD9lA6HtCHA.1644%40TK2MSFTNGP12
And more discussion of it here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=eJ9l9g2JCHA.2160%40tkmsftngp10
(Complete thread)
You can also try the SetParent api call, but this is makes one form a child
MDI form to a parent form -- it doesn't just make it on top.
Hope this helps,
Robert Jacobson
"Simanovsky" <asima...@yahoo.com> wrote in message
news:031001c37e04$c97f06a0$a101...@phx.gbl...
dlgField.Owner = this;
if you're bringing it up from a Form.
Tom Clement
Apptero, Inc.
"Simanovsky" <asima...@yahoo.com> wrote in message
news:031001c37e04$c97f06a0$a101...@phx.gbl...
> Hello,
"Tom" <TomReM...@Apptero.com> wrote in message
news:e4R1FMhf...@TK2MSFTNGP11.phx.gbl...
"Robert Jacobson" <rjacobson_at...@nospam.com> wrote in message
news:edSchchf...@TK2MSFTNGP09.phx.gbl...
"Tom" <TomReM...@Apptero.com> wrote in message
news:ua0TRAi...@TK2MSFTNGP12.phx.gbl...
Thanks a lot. Your advice with SetWindowLong did help.
I also used Form.ShowDialog(IWin32Window) for modal forms.
Unfortunately, I could not use Form.Owner property as Tom
have suggested -- I'm sorry for not stating that my main
application window is not a .NET form.
WBR,
A.Simanovsky