How to attach my WPF window with Calculator which is a Desktop application?
My requirement is to when i move WPF window, calculator application should come together and vice-versa.
Please guide me the correct way to achieve my objective.
How to attach my WPF window with Calculator which is a Desktop application?
My requirement is to when i move WPF window, calculator application should come together and vice-versa.
Please guide me the correct way to achieve my objective.
First, I would assume that you are using the standard Windows Calculator app started as:
System.Diagnostics.Process.Start("calc.exe");
// or, alternatively
System.Diagnostics.Process.Start("calc");
If so, then you can achieve your goal by using Win32 DLL functions:
[DllImport("user32")]
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags)
as detailed in: Hosting external app in WPF window