本文介绍了vb.net确定屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以确定表单所在的屏幕?不是位置或大小!

Is it possible to determine the screen where a form is located? Not the position or the Size!

我用过

Dim myScreens() As Screen = Screen.AllScreens

Me.Left = (myScreens(0).WorkingArea.Width - Me.Size.Width) / 2
Me.Top = (myScreens(0).WorkingArea.Height - Me.Size.Height) / 2

将表格提交.当用户将表单重新放置到另一个屏幕上时,我想保存该新屏幕的位置!

to postion the Form. When the user relocates the form onto another screen, I want to save that postion of that new screen!

推荐答案

是的,请使用 Screen.FromControl(Me) .

Yes, use Screen.FromControl(Me).

这篇关于vb.net确定屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 21:02