walterlv / BlogComments

3 stars 0 forks source link

post/detect-screen-that-contains-the-wpf-window #64

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

WPF / Windows Forms 检测窗口在哪个屏幕 - walterlv

WPF / Windows Forms 检测窗口在哪个屏幕

https://blog.walterlv.com/post/detect-screen-that-contains-the-wpf-window.html

h82258652 commented 4 years ago

这个有点意思。说起来,能获取的话,那么能设置吗? 例如某程序主窗口在 A 屏幕上,然后能不能创建一个新窗口,并且 Show 在 B 屏幕上?

kkwpsv commented 4 years ago

计算屏幕的坐标,设置你要创建窗口的坐标,在B屏幕就行。。。

walterlv commented 4 years ago

@kkwpsv 这个用 Win32 方法会比较好做。如果用 WPF 坐标……呵呵……

icetech233 commented 2 years ago

啊,我疯了,dpi