1

When there are multiple forms of one window app, I want to get the parent WindowMainHandle. (Main Form)

The problem is that when the child form is selected, I get the child WindowMainHandle.

how should i solve it?

Process[] viewProcesses = Process.GetProcessesByName(Application.ProductName); IntPtr hWndOfPrevInstance = viewProcesses[0].MainWindowHandle;

enter image description here

Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
LWY
  • 11
  • 1

0 Answers0