【VB开源代码栏目提醒】:本文主要为网学会员提供Ex6_13.frm,希望对需要Ex6_13.frm网友有所帮助,学习一下!
VERSION 5.00
Begin VB.Form Ex6_13
Caption = "Form1"
ClientHeight = 3060
ClientLeft = 120
ClientTop = 420
ClientWidth = 4560
LinkTopic = "Form1"
ScaleHeight = 3060
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 60
Left = 2040
Top = 1800
End
End
Attribute VB_Name = "Ex6_13"
Attribute
VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private WithEvents ClsFrm As ClsEvent '声明WithEvents变量
Attribute ClsFrm.VB_VarHelpID = -1
Private Sub ClsFrm_Scaleto(ratex As Single, ratey As Single)
'改变窗口大小
ClsFrm.oForm.width = ClsFrm.oForm.width * ratex
ClsFrm.oForm.height = ClsFrm.oForm.height * ratey
'在窗体标题栏上显示窗体的宽和高
ClsFrm.oForm.Caption = "宽:" & ClsFrm.oForm.width & _
" 高:" & ClsFrm.oForm.height
End Sub
Private Sub Form_Initialize()
Set ClsFrm = New ClsEvent '创建类对象
Set ClsFrm.oForm = Ex6_13 '为类的属性过程赋值
ClsFrm.SetSize 1, 1 '初始化窗体的大小
End Sub
Private Sub Timer1_Timer()
ClsFrm.frmMove 1, 1, 1.2, 1.3 '调用frmMove过程触发ClsFrm_Scaleto事件
If Ex6_13.width >= Screen.width Or Ex6_13.height >= Screen.height Then
Timer1.Enabled = False
End If
End Sub