关于vb.net显示器的信息
VB.NET中怎么实现双屏显示不同的窗体
两个显示器显示有两种模式,一种是
创新互联长期为成百上千客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为富裕企业提供专业的成都网站制作、成都网站设计、外贸营销网站建设,富裕网站改版等技术服务。拥有十余年丰富建站经验和众多成功案例,为您定制开发。
双屏
复制,另一种是扩展。
你这个只能用第二种方式。你需要把要在另一个显示器上显示的窗体的Location设置在主显示器全屏时的右边就可以了.其实就是桌面的向右延伸。
在主显示上拖一下窗体就明白了!
vb.net多屏时控制窗体显示在哪个显示器上
''' summary多屏显示屏幕设置/summary
''' param name="obj"目标窗体/param
''' param name="scrIndex"由0开始的屏幕索引,0为主屏幕/param
Private Sub ShowScreens(obj As Form, scrIndex As Integer)
Dim arr As Screen() = Screen.AllScreens
If scrIndex arr.Length Then
obj.Left += arr(scrIndex).Bounds.X
Else
Dim mess As String = "当前屏幕索引超出范围,是否要显示在最后一个屏幕?"
Dim result As DialogResult = _
MessageBox.Show(mess, "信息提示", _
MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If result = Windows.Forms.DialogResult.Yes Then _
obj.Left += arr(arr.Length - 1).Bounds.X
End Sub
多屏幕的显示,屏幕的宽度相当等于N屏幕的宽度之和,更改窗体的X坐标就能控制窗体显示在哪个屏幕上。
VB.NET设置屏幕分辨率、颜色位数、刷新率 实例代码
这篇文章介绍了VB.NET设置屏幕分辨率、颜色位数、刷新率
实例代码,有需要的朋友可以参考一下
复制代码
代码如下:
Private
Declare
Function
GetDeviceCaps
Lib
"gdi32"
(ByVal
hdc
As
Long,
ByVal
nIndex
As
Long)
As
Long
Private
Declare
Function
ChangeDisplaySettings
Lib
"user32"
Alias
"ChangeDisplaySettingsA"
(lpDevMode
As
Any,
ByVal
dwflags
As
Long)
As
Long
Private
Const
CCDEVICENAME
As
Long
=
32
Private
Const
CCFORMNAME
As
Long
=
32
Private
Const
DM_BITSPERPEL
As
Long
=
H40000
Private
Const
DM_PELSWIDTH
As
Long
=
H80000
Private
Const
DM_PELSHEIGHT
As
Long
=
H100000
Private
Const
DM_DISPLAYFLAGS
As
Long
=
H200000
Private
Const
DM_DISPLAYFREQUENCY
=
H400000
Private
Const
CDS_FORCE
As
Long
=
H80000000
Private
Const
BITSPIXEL
As
Long
=
12
Private
Const
HORZRES
As
Long
=
8
Private
Const
VERTRES
As
Long
=
10
Private
Const
VREFRESH
=
116
Private
Type
DEVMODE
dmDeviceName
As
String
*
CCDEVICENAME
dmSpecVersion
As
Integer
dmDriverVersion
As
Integer
dmSize
As
Integer
dmDriverExtra
As
Integer
dmFields
As
Long
dmOrientation
As
Integer
dmPaperSize
As
Integer
dmPaperLength
As
Integer
dmPaperWidth
As
Integer
dmScale
As
Integer
dmCopies
As
Integer
dmDefaultSource
As
Integer
dmPrintQuality
As
Integer
dmColor
As
Integer
dmDuplex
As
Integer
dmYResolution
As
Integer
dmTTOption
As
Integer
dmCollate
As
Integer
dmFormName
As
String
*
CCFORMNAME
dmUnusedPadding
As
Integer
dmBitsPerPel
As
Integer
dmPelsWidth
As
Long
dmPelsHeight
As
Long
dmDisplayFlags
As
Long
dmDisplayFrequency
As
Long
End
Type
Private
Sub
cmdChangeDesktopMode_Click()
Dim
DM
As
DEVMODE
With
DM
.dmPelsWidth
=
CInt(txtNewWidth.Text)
.dmPelsHeight
=
CInt(txtNewHeight.Text)
.dmBitsPerPel
=
CInt(txtNewColor.Text)
.dmDisplayFrequency
=
CInt(txtNewFreq.Text)
.dmFields
=
DM_PELSWIDTH
Or
DM_PELSHEIGHT
Or
DM_BITSPERPEL
Or
DM_DISPLAYFREQUENCY
.dmSize
=
LenB(DM)
End
With
If
ChangeDisplaySettings(DM,
CDS_FORCE)
Then
MsgBox
"错误!不支持此模式!"
End
If
End
Sub
Private
Sub
Form_Load()
txtOldWidth.Text
=
GetDeviceCaps(Me.hdc,
HORZRES)
txtOldHeight.Text
=
GetDeviceCaps(Me.hdc,
VERTRES)
txtOldColor.Text
=
GetDeviceCaps(Me.hdc,
BITSPIXEL)
txtOldFreq.Text
=
GetDeviceCaps(Me.hdc,
VREFRESH)
End
Sub
VB.NET怎样把USB摄像头在显示器上输出的实时画面(像素信息),引入到数据库.
用directshow获取帧缓存,转换为标准图像格式(比如jpg,png这些),存储到数据库的image字段里就行了.
一台主机3个显示器做扩展桌面显示,VB。net做三个窗口怎么把这三个窗口分别显示在三个桌
首先显示器设置成“扩展”模式,即三台显示器的屏幕共同组成一个横向的大屏幕
其次,将VB.NET的三个窗口用代码移动到每个显示器的坐标原点即可
新闻名称:关于vb.net显示器的信息
文章地址:http://cdiso.cn/article/hgdhjd.html