【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“ChangeResolutionForm.frm”一文,供大家参考学习!
VERSION 5.00
Object = "{6FF9A514-A943-11D2-8D43-F90F0D71B6F6}#1.0#0"; "CHANGERES.OCX"
Begin VB.Form ChangeResolutionForm
Caption = "改变显示器的分辨率"
ClientHeight = 4275
ClientLeft = 60
ClientTop = 375
ClientWidth = 4320
LinkTopic = "Form1"
ScaleHeight = 4275
ScaleWidth = 4320
StartUpPosition = 3 '窗口缺省
Begin ChangeResProject.ChangeRes ChangeRes1
Left = 2400
Top = 0
_ExtentX = 1005
_ExtentY = 1085
End
Begin VB.CommandButton NewSettingCommand
Caption = "设置新的显示器分辨率"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1200
TabIndex = 8
Top = 3480
Width = 2055
End
Begin VB.TextBox NewWidth
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2640
TabIndex = 7
Top = 2280
Width = 1215
End
Begin VB.TextBox NewHeight
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2640
TabIndex = 6
Top = 2760
Width = 1215
End
Begin VB.Label Label2
Caption = "设置新的显示器分辨率"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 10
Top = 1800
Width = 2415
End
Begin VB.Label Label1
Caption = "显示器初始值:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 9
Top = 240
Width = 1695
End
Begin VB.Label HeightLabel
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 2640
TabIndex = 3
Top = 1320
Width = 1215
End
Begin VB.Label WidthLabel
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 2640
TabIndex = 2
Top = 720
Width = 1215
End
Begin VB.Label Label7
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "Height"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 1
Top = 1320
Width = 2175
End
Begin VB.Label Label6
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "Width"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 0
Top = 720
Width = 2175
End
Begin VB.Label Label9
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "New Height"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 5
Top = 2760
Width = 2055
End
Begin VB.Label Label8
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "New Width"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 4
Top = 2280
Width = 2055
End
End
Attribute VB_Name = "ChangeResolutionForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ChangeRes1_Click()
End Sub
Private Sub Form_Load()
ChangeRes1.GetMonitorInfo = True
HeightLabel.Caption = ChangeRes1.Ypixels '获得显示器的高
WidthLabel.Caption = ChangeRes1.Xpixels '获得显示器的宽
End Sub
Private Sub NewSettingCommand_Click()
ChangeRes1.Xpixels = Val(NewWidth.Text) '显示器的宽(像素)
ChangeRes1.Ypixels = Val(NewHeight.Text) '显示器的高(像素)
ChangeRes1.ChangeResolution = True '获得当前的分辨率
If ChangeRes1.Error = True Then
MsgBox "你的显示器不能改变分辨率 " + NewWidth.Text + "X" + NewHeight.Text
End If
End Sub
上一篇:
changepwd.frm
下一篇:
法律专业开题报告范文