

Private void btnCalc_Click(object sender, EventArgs e) Keybd_event((byte)ALT, 0x45, EXTENDEDKEY | KEYUP, 0) Keybd_event((byte)ALT, 0x45, EXTENDEDKEY | 0, 0)

ShowWindow(mainWindowHandle, SW_RESTORE) if (mainWindowHandle = GetForegroundWindow()) return Public static void BringProcessToFront(IntPtr mainWindowHandle) Private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow) Private static extern bool SetForegroundWindow(IntPtr hWnd) Private static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo)

If it's running bring the window to front even if it's minimized or not. In my application (C# WinForm), I would like to start system Calculator, if it's not running. I think the main problem is, that Calculator is part of "ApplicationFrameHost". I have tested a lot of codes, but nothing is really working. I would like to ask you a question about bringing calculator window to front in Windows 10.
