c# program to move a window on desktop from a side to another when it looses focus
-
I know i ask lots of question... M sorry to keep bugging... I wanted to know if i can make such a program which on running, can make the active window (if not maximized) to come in center of the desktop. and when that window looses focus, it is moved to a side... Every window which is not maximized shud be affected by it... Can I??? Plz enlight me with knowledge abt it...
-
I know i ask lots of question... M sorry to keep bugging... I wanted to know if i can make such a program which on running, can make the active window (if not maximized) to come in center of the desktop. and when that window looses focus, it is moved to a side... Every window which is not maximized shud be affected by it... Can I??? Plz enlight me with knowledge abt it...
You would need to use an API method such and FindWindow to locate all of the windows but hooking into them to override the locations and behaviors is not worth the effort IMO.
I know the language. I've read a book. - _Madmatt
-
I know i ask lots of question... M sorry to keep bugging... I wanted to know if i can make such a program which on running, can make the active window (if not maximized) to come in center of the desktop. and when that window looses focus, it is moved to a side... Every window which is not maximized shud be affected by it... Can I??? Plz enlight me with knowledge abt it...
Is that what your users would want to have happen?
-
Is that what your users would want to have happen?
I have to agree, it would annoy the crap out of me...
Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
-
Is that what your users would want to have happen?
i want to make a program which can replace the desktop window manager in window... i want my program to handle all the open windows like the way i want it to... is it possible... a window opens it comes to center. when it looses focus of when i'm done with it it goes to either side of screen.. Dwm does it in a different way, it minimizes the windows to taskbar until again activated..and it restores the window in the last opened place...
-
i want to make a program which can replace the desktop window manager in window... i want my program to handle all the open windows like the way i want it to... is it possible... a window opens it comes to center. when it looses focus of when i'm done with it it goes to either side of screen.. Dwm does it in a different way, it minimizes the windows to taskbar until again activated..and it restores the window in the last opened place...
Based on this and the other post I think you need to write your own operating system.
-
Based on this and the other post I think you need to write your own operating system.
-
Really... doesn't any namespace can help me with this... C# has so many namespaces... u must be knowing some which can handle the windows...
It is likely possible, but probably very difficult, error-prone, and unlikely to be welcome to the user. All-in-all it's not worth the trouble.
-
Really... doesn't any namespace can help me with this... C# has so many namespaces... u must be knowing some which can handle the windows...
He's correct. If you want a smooth version of this, you'd have to rewrite part of the Win32 API. There is no namespace or class in the .NET Framework that can do this for you. The only way you can do it is if you used a couple of the Win32 API functions, constantly polling for the foreground window and moving it when it appears. This will introduce a flicker as you have to wait for the window to show up in one spot then move it, painting the window twice in two different spots. There is no way to avoid this.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
It is likely possible, but probably very difficult, error-prone, and unlikely to be welcome to the user. All-in-all it's not worth the trouble.
-
He's correct. If you want a smooth version of this, you'd have to rewrite part of the Win32 API. There is no namespace or class in the .NET Framework that can do this for you. The only way you can do it is if you used a couple of the Win32 API functions, constantly polling for the foreground window and moving it when it appears. This will introduce a flicker as you have to wait for the window to show up in one spot then move it, painting the window twice in two different spots. There is no way to avoid this.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
the problem u are mentioning... is tolerable.. i mean.. first let it be allowed to open as it opens then my program can take control of it... wat say...
I say it looks cheesy and is of no benefit to users.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
m ready to do the hard work... m ready to do it... just guide me.. plz.. i wanna make this application... guide me...
ayandelhi wrote:
m ready to do the hard work... m ready to do it...
But are your users ready to use it?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
I say it looks cheesy and is of no benefit to users.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak