471,325 Members | 1,233 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

SW_SHOWNOACTIVATE

Is there a managed equivalent in C# 2.0 to :

ShowWindow(SW_SHOWNOACTIVATE)

I have a form set as SizableToolWindow and it takes focus away from my main
form. I'd rather use managed code if possible.

steven :: http://stevenR2.com
Jan 12 '06 #1
4 5382
Steven,

No, there is no managed way to do this, I believe. However, you should
be able to write an overload of the Show method which will take a boolean
value indicating whether or not to activate the form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl...
Is there a managed equivalent in C# 2.0 to :

ShowWindow(SW_SHOWNOACTIVATE)

I have a form set as SizableToolWindow and it takes focus away from my
main form. I'd rather use managed code if possible.

steven :: http://stevenR2.com

Jan 12 '06 #2
Thanks Nicholas :-

I was hoping it would be a straight swap, but there is a bit of work in
doing this - back to the drawing board.

Steven

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O$**************@TK2MSFTNGP12.phx.gbl...
Steven,

No, there is no managed way to do this, I believe. However, you should
be able to write an overload of the Show method which will take a boolean
value indicating whether or not to activate the form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl...
Is there a managed equivalent in C# 2.0 to :

ShowWindow(SW_SHOWNOACTIVATE)

I have a form set as SizableToolWindow and it takes focus away from my
main form. I'd rather use managed code if possible.

steven :: http://stevenR2.com


Jan 12 '06 #3
Steven,

There isn't really THAT much work in doing this. You can get the
declaration of ShowWindow from http://www.pinvoke.net and then just wrap
it...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:um**************@TK2MSFTNGP09.phx.gbl...
Thanks Nicholas :-

I was hoping it would be a straight swap, but there is a bit of work in
doing this - back to the drawing board.

Steven

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:O$**************@TK2MSFTNGP12.phx.gbl...
Steven,

No, there is no managed way to do this, I believe. However, you
should be able to write an overload of the Show method which will take a
boolean value indicating whether or not to activate the form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl...
Is there a managed equivalent in C# 2.0 to :

ShowWindow(SW_SHOWNOACTIVATE)

I have a form set as SizableToolWindow and it takes focus away from my
main form. I'd rather use managed code if possible.

steven :: http://stevenR2.com



Jan 12 '06 #4
Thanks Nicholas - I managed to get it working.
It wasn't so much the work in the call, but rather the worry the rest of the
animation i had added that was effected - i moved from things around and it
works great.

thanks for the pointer :)

steven :: http://stevenR2.com

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ec**************@tk2msftngp13.phx.gbl...
Steven,

There isn't really THAT much work in doing this. You can get the
declaration of ShowWindow from http://www.pinvoke.net and then just wrap
it...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:um**************@TK2MSFTNGP09.phx.gbl...
Thanks Nicholas :-

I was hoping it would be a straight swap, but there is a bit of work in
doing this - back to the drawing board.

Steven

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:O$**************@TK2MSFTNGP12.phx.gbl...
Steven,

No, there is no managed way to do this, I believe. However, you
should be able to write an overload of the Show method which will take a
boolean value indicating whether or not to activate the form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steven Livingstone" <co*****@NOSPAM.stevenR2.com> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl...
Is there a managed equivalent in C# 2.0 to :

ShowWindow(SW_SHOWNOACTIVATE)

I have a form set as SizableToolWindow and it takes focus away from my
main form. I'd rather use managed code if possible.

steven :: http://stevenR2.com



Jan 12 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Petec | last post: by
2 posts views Thread by Robert Misiak | last post: by
5 posts views Thread by Stefano Camaiani | last post: by
2 posts views Thread by Ramkishan Algude via DotNetMonster.com | last post: by
2 posts views Thread by vooose | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.