📄 frmtest.frm
字号:
VERSION 5.00
Begin VB.Form frmTest
AutoRedraw = -1 'True
Caption = "IShape, CPoint, and CCircle classes"
ClientHeight = 1080
ClientLeft = 5115
ClientTop = 3990
ClientWidth = 8250
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 1080
ScaleWidth = 8250
End
Attribute VB_Name = "frmTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Form module that exercises IShape, CPoint,
' and CCircle
Option Explicit
Private Sub Form_Load()
Dim p As New CPoint ' Create a CPoint
Dim c As New CCircle ' Create a CCircle
Dim iRef As IShape ' Create an IShape reference
p.X = 500 ' Set X via Property Let
p.Y = 777 ' Set Y via Property Let
Set iRef = p ' Assign a CPoint object to an IShape reference
' Invoke IShape members of p using iRef
Print "Name: " & iRef.Name & " Area: " & iRef.Area, _
" ToString: " & iRef.ToString
Set iRef = c ' Assign a CCircle object to an IShape reference
c.Radius = 4 ' Set Radius via Property Let
c.X = 11 ' Set X via Property Let
c.Y = 812 ' Set Y via Property Let
' Invoke IShape members of c using iRef
Print "Name: " & iRef.Name & " Area: " & iRef.Area, _
" ToString: " & iRef.ToString
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -