SW_SHOWNOACTIVATE

  • Thread starter Thread starter Steven Livingstone
  • Start date Start date
S

Steven Livingstone

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
 
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.
 
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 said:
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]
- (e-mail address removed)

Steven Livingstone said:
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
 
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]
- (e-mail address removed)

Steven Livingstone said:
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 said:
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]
- (e-mail address removed)

Steven Livingstone said:
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
 
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 said:
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]
- (e-mail address removed)

Steven Livingstone said:
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 said:
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]
- (e-mail address removed)

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
 
Back
Top