3

So, I've been experimenting with child windows in WPF, using SetParent, and trying to set up some transparency on the child window. It looks like I've got a bit of a catch-22.

If I set the child's WindowStyle = None, as it seems is required for transparency, I cannot move/resize the child correctly. If I don't set the WindowStyle, I can't get transparency.

Does anyone have any ideas on either how to move/resize the child window correctly, when it's WindowStyle = None, or to get transparency without WindowStyle = None?

The parent window and child window are in separate processes. I am running on Windows 7. I am happy to use WinApi calls, language is in C#.

I should note that the user should not be able to reposition or resize the child window directly. The child window gets resized when the parent window is resized, so that the size of the child is alwasy relative to the size of the parent window.And, because the parent and child window are in separate processes, I am using SetWindowPos to resize the child window.

The example https://github.com/Hexum064/TransparentChild

Hexum064
  • 349
  • 2
  • 14
  • Is it related to parent-child relationships somehow? Or question is just about transparency? – Evk Oct 25 '17 at 18:31
  • @Evk, well, more about transparency. But it seems this problem with resizing the child window only manifests itself when the window IS a child window AND when that window's WindowStyle=None. – Hexum064 Oct 25 '17 at 19:39

0 Answers0