窗体:
IntPtr hwnd = new WindowInteropHelper(this).Handle;
控件:
IntPtr hwnd = ((HwndSource)PresentationSource.FromVisual(uielement)).Handle;
2022-11-12 11:24:46
窗体:
IntPtr hwnd = new WindowInteropHelper(this).Handle;
控件:
IntPtr hwnd = ((HwndSource)PresentationSource.FromVisual(uielement)).Handle;