0

I was trying to overlap two windows one over another to overcome airspace issue in my WPF application. I need the two windows to move together and resize together and require all animations to be as it is (I mean the window restore, maximize and minimize animations).

I was able to move and resize the window together but since I use WS_EX_NOACTIVATE my background window is not minimized on to taskbar, it goes to the bottom left corner of the Desktop.

Here is a sample screenshot:

Before minimize, the window looks like :

Before maximize

After minimize the window looks like :

After maximize

Since the window gets minimized to desktop instead of taskbar I decided to change the position to which window is minimized to, if I could minimize both window to same coordinates then the animation will be smooth ,once minimize is complete I will hide the background window.

Is there any way to set the point to which window is minimized to. Some apps like Rocket Dock was able to do it, so it is possible, but how can I do it.

Note : The blur is drawn into the background Window

trickymind
  • 557
  • 5
  • 21
  • You position a Window using the Window.Top and Window.Left properties. You can use the Window.Topmost property to control layering. If your windows have a kind of a primary/secondary relationship you can use the Window.Owner property to manifest such. This way for exaple minimizing the owner would also minimize all owned Window instances. Minimizing/maximizing is always referring to the default Windows minimize/maximize behavior. But you can overrride the default WindowChrome to implement a custom behavior by modifying the action of the chrome buttons. – BionicCode Aug 23 '21 at 14:27
  • [Example](https://stackoverflow.com/a/68548769/3141792) that shows how you can override the default window chrome. – BionicCode Aug 23 '21 at 14:28
  • It's not about overriding the default window style, setting owner window also does the same thing it will minimize to desktop if i use WS_EX_NOACTIVE, The background window uses Windows.UI.Composition to draw acrylic, so i cannot draw any wpf controls on it, if i need to draw anything means i need to create a seperate foreground window and draw controls on it. i resize the background window by handling WM_WINDOWPOSCHANGED message and use setWindowPos(). – trickymind Aug 23 '21 at 14:47
  • I tried using some shell api to remove the icon from taskbar and alt+tab, and this occurs : https://user-images.githubusercontent.com/72641365/130594549-a0095b94-6318-4449-89aa-9d4213e02a30.mp4 – trickymind Aug 24 '21 at 12:20
  • the flickering is because of screen recorder, the position to which the window minimize is like (-3200,-3200) issue that was in Windows NT – trickymind Aug 24 '21 at 12:21
  • I slow down dwm animations to see where the window is moving to – trickymind Aug 24 '21 at 12:22

0 Answers0