using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public static class DisplayFusionFunction
{
[STAThread]
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
static extern bool PostMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
const uint WM_PASTE = 0x302;
public static void Run(IntPtr windowHandle)
{
Clipboard.GetText();
Process p = Process.Start("notepad.exe");
p.WaitForInputIdle();
IntPtr EditHandle = FindWindowEx(p.MainWindowHandle, IntPtr.Zero, "edit", null);
PostMessage(new HandleRef(p, EditHandle), WM_PASTE, IntPtr.Zero, IntPtr.Zero);
}
}