code236a.txt
来自「VB大全(精华版)源代码」· 文本 代码 · 共 27 行
TXT
27 行
Public Type Shape
ShapeType As Integer
Color As Integer
Radius As Single
Area As Single
Perimeter As Single
End Type
Public Sub Show_Structure(InShape As Shape)
Debug.Print "shape.type: ", InShape.ShapeType
Debug.Print "shape.color: ", InShape.Color
Debug.Print "shape.radius:", InShape.Radius
Debug.Print "shape.area: ", InShape.Area
Debug.Print "shape.perimeter:", InShape.Perimeter
End Sub
Public Sub Main()
Dim myCircle As Shape
myCircle.ShapeType = 0
myCircle.Color = 1
myCircle.Radius = 5#
myCircle.Area = 22# / 7# * myCircle.Radius * myCircle.Radius
myCircle.Perimeter = 2# * 22# / 7# * myCircle.Radius
Show_Structure myCircle
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?