vb.net 怎么在屏幕打点画点:
在PictureBox的Paint事件里面:
dim myGraphics=e.Graphics
Dim myPointArray As Point() = {New Point(0, 0), New Point(50, 30), New Point(30, 60)}
myGraphics.DrawPolygon(myPen, myPointArray)
画圆:
Dim g As Graphics
g = PictureBox1.CreateGraphics
g.FillEllipse(Brushes.Red, x, y, 10, 10)
VB.net 界面无法出现在屏幕中央要么在属性栏设置,要么在 new 事件里 写这句代码
load事件无用
Public Sub New()
InitializeComponent()
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
End Sub
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中怎么可以让窗体全屏显示?Me.Height = My.Computer.Screen.Bounds.Height
Me.Width = My.Computer.Screen.Bounds.Width
这是设置窗体的长宽和屏幕的分辨率一样大小 , 相当于全屏 。
如果Me.WindowState=FormWindowState.Maximized的话,只是单纯的将窗体最大化,但恢复窗口大小后窗体的大小实际上还和原来一样大 。
VB.NET的特点
1.真正成为面向对象以及支持继承性的语言 。
2.窗体设计器支持可视化继承,并且包含了许多新的特性,比如自动改变窗体大小、资源本地化支持、数据类工具内在支持XML数据 。
3.直接建立在.NET的框架结构上 , 因此开发人员可以充分利用所有.NET平台特性,也可以与其他的.NET语言交互 。
4.为Windows应用程序提供了XCOPY部署,开发者不再需要为DLL的版本问题担忧 。
如何在代码中设置vb.net运行初始界面与屏幕右上角对齐?获取屏幕大小宽和高 和初始化窗口的尺寸 屏幕减尺寸等于你想要的left值 和top值 即屏幕比你窗体高多少 宽多少就是你右对齐的初始值 右上角对齐top依旧为0
vb.net中如何关闭屏幕刷新?vb.net中关闭屏幕刷新方法为:
1、修改完恢复初始状态callformload 。
2、显示修改后信息,控件refresh,例如用data控件,则data1.refresh即可 。
3、数据库资料用label显示,则label.refresh同时用me.refresh 。
【vb.net屏幕 vbnet tooltip】vb.net屏幕的介绍就聊到这里吧,感谢你花时间阅读本站内容 , 更多关于vbnet tooltip、vb.net屏幕的信息别忘了在本站进行查找喔 。
推荐阅读
- 500块的公路赛车游戏,公路赛车无限金币版下载
- gis数据偏差,gis数据处理问题
- asp.net占用内存,aspnet
- html5js水果机,水果机平台
- go语言适合哪些引擎开发 go语言适用领域
- 包含asp.netmvcmasterpage的词条
- gis里dem高程数据生成等高线,gis高程点怎么生成等高线
- 印象眸直播教程,印象眸是真的吗
- oracle如何清理数据 oracle数据库清理空间