A set of .NET Framework managed libraries for developing graphical user interfaces.
Hello @Researcher ,
Thanks for your question.
- Why does this behavior occur only on a Windows 11 local machine but not in VM or Remote Desktop sessions?
This difference is typically caused by environmental factors rather than a single documented OS change.
On Windows 11 local, SetParent() moves the window logically but the window rendering system (DWM) still draws it visually as a separate top-level window, they go out of sync. This does not happen in other environments:
- VM: Uses a simplified/software rendering pipeline (limited or no GPU acceleration), which appears to allow cross-process
SetParent()to work visually - RDP: Uses GDI-based pixel remoting instead of local GPU compositing, bypassing the rendering layer that causes the issue
- Windows 10: The same
SetParent()trick works, suggesting Microsoft tightened window rendering isolation in Windows 11, likely to support new UI features like rounded corners, Snap Layouts, and Mica effects — though this specific change is not officially documented
- Is there a reliable way to embed (dock) an external application like Notepad++ inside a WinForms application on modern Windows versions?
No, SetParent() across two separate processes was not officially supported . You can use an embedded editor component like ScintillaNET. Or run Notepad++ as a separate application
While this is a non-Microsoft link, it’s official Github documentation and is safe to visit.
- Are there any OS-level restrictions or changes in Windows 11 (e.g., windowing, DPI, security, or process isolation) that could prevent SetParent from working as expected?
- UIPI: If Notepad++ runs as Administrator and your app does not, Windows silently blocks SetParent() with no error or exception.
- DPI awareness mismatch: If your WinForms app and Notepad++ run at different DPI scales, the embedded window may appear at the wrong position or outside your panel entirely
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.