You can open Notepad in WinForm with this code:
public partial class Form1 : Form
{
[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
public Form1()
{
InitializeComponent();
Process p = Process.Start("notepad.exe");
p.WaitForInputIdle(); // Allow the process to open it's window
SetParent(p.MainWindowHandle, this.Handle);
}
}
In WPF this.handle
is not recognized. What is the WPF version of this.Handle?
And how can you open Notepad in full screen without the close button's in a WPF screen?