I'm trying to keep a form on top of all other windows in its own
application, but not on top of all windows in all applications.



I can get it to be on top of all applications by setting "TopMost = true",
but can't get it to only be on top of its own application (i.e. when I
select another application the form I've made TopMost is still on top of
everything).



I've tried setting the MdiParent to be the application, but then the
"TopMost" property seems to have no effect (the code I was using for this is
shown below).



DebugControl debugCtrl = new DebugControl();

debugCtrl.MdiParent = this;

debugCtrl.TopMost = true;

debugCtrl.Show();






Has anyone any idea how I can do this?



Thanks in advance,

Steve

Re: Keeping a form on top of its application by Alexey

Alexey
Thu Nov 10 09:10:40 CST 2005

Try this:



DebugControl debugCtrl = new DebugControl();
debugCtrl..Owner = this;
debugCtrl.Show();



Alexey Borzenkov

"Steve Roberts" <steve.roberts@macro4.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:dkvban$flk$1$8300dec7@news.demon.co.uk...
> I'm trying to keep a form on top of all other windows in its own
> application, but not on top of all windows in all applications.
>
>
>
> I can get it to be on top of all applications by setting "TopMost = true",
> but can't get it to only be on top of its own application (i.e. when I
> select another application the form I've made TopMost is still on top of
> everything).
>
>
>
> I've tried setting the MdiParent to be the application, but then the
> "TopMost" property seems to have no effect (the code I was using for this
> is shown below).
>
>
>
> DebugControl debugCtrl = new DebugControl();
>
> debugCtrl.MdiParent = this;
>
> debugCtrl.TopMost = true;
>
> debugCtrl.Show();
>
>
>
>
>
>
> Has anyone any idea how I can do this?
>
>
>
> Thanks in advance,
>
> Steve
>
>



Re: Keeping a form on top of its application by Steve

Steve
Thu Nov 10 10:22:26 CST 2005

Thanks Alexey,

That's fixed it - so I can stop tinkering with TopLevel, TopMost &Z-Orders.

Thanks again,
Steve

"Alexey Borzenkov" <borzenkov@wp.pl> wrote in message
news:Oj4Ssjg5FHA.1248@TK2MSFTNGP14.phx.gbl...
> Try this:
>
>
>
> DebugControl debugCtrl = new DebugControl();
> debugCtrl..Owner = this;
> debugCtrl.Show();
>
>
>
> Alexey Borzenkov
>
> "Steve Roberts" <steve.roberts@macro4.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
> ÓÌÅÄÕÀÝÅÅ: news:dkvban$flk$1$8300dec7@news.demon.co.uk...
>> I'm trying to keep a form on top of all other windows in its own
>> application, but not on top of all windows in all applications.
>>
>>
>>
>> I can get it to be on top of all applications by setting "TopMost =
>> true", but can't get it to only be on top of its own application (i.e.
>> when I select another application the form I've made TopMost is still on
>> top of everything).
>>
>>
>>
>> I've tried setting the MdiParent to be the application, but then the
>> "TopMost" property seems to have no effect (the code I was using for this
>> is shown below).
>>
>>
>>
>> DebugControl debugCtrl = new DebugControl();
>>
>> debugCtrl.MdiParent = this;
>>
>> debugCtrl.TopMost = true;
>>
>> debugCtrl.Show();
>>
>>
>>
>>
>>
>>
>> Has anyone any idea how I can do this?
>>
>>
>>
>> Thanks in advance,
>>
>> Steve
>>
>>
>
>