473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 5474
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lauren Wilson | last post by:
Hi folks, I copied Dev Ashish's code below to a module in Access 2K. No mater what I do, Access will not recognize the function. What have I overlooked? I know I'm going to feel like an...
5
by: Petec | last post by:
Is there a way to prevent a form from getting focus? Thanks! - Pete
2
by: Robert Misiak | last post by:
Is it possible to display a window on top without it stealing focus? (and I'm not talking about stealing focus from my application - I'm talking about it stealing focus from any application.) ...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
5
by: Stefano Camaiani | last post by:
Hello, please someone have the working code on how to call the CreateProcess API in Vb.Net? I need to call the CreateProcess API directly and i should not use the Vb.Net Process functions like dim...
2
by: Ramkishan Algude via DotNetMonster.com | last post by:
I am New Member on this site. And also new learner to .Net. I have a query, I have to minimize/maximize the currently running some applications on my system through my VB.Net application. Please...
2
by: vooose | last post by:
Form form = new Form(); when you call ShowWindow(form, SW_SHOWNOACTIVATE); the form disappears the next time the garbage collector is called, assuming the form variable has gone out of...
2
by: Intalexual | last post by:
Ok, I'm having a little trouble finding the correct way to have a word document print out in the background when selecting it on the switchboard. Is there any way this can be done? I already...
0
by: DougRenwick | last post by:
I'm an trying to prevent my application from stealing the focus from the application that launched it. Overriding the ShowWithoutActivation property returns a value of true but does not prevent the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.