Finding the handle to a WPF window

前端 未结 4 1391
庸人自扰
庸人自扰 2020-11-30 00:19

Windows forms had a property win1.Handle which, if I recall, returns the handle of the main window handle?

Is there an equivalent way to get the handle of a WPF Wind

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 00:47

    you can use :

    Process.GetCurrentProcess().MainWindowHandle
    

提交回复
热议问题