module3.bas

来自「本软件为脚本导航」· BAS 代码 · 共 35 行

BAS
35
字号
Attribute VB_Name = "Module3"
Option Explicit

'转盘程序

Dim UnitG As Long
Function InitePan(ByRef Huan As Shape, ByRef Zhen As Line) As String
Dim DuConvertX As Double, DuConvertY As Double
Dim Du As Double, L As Double, H As Double
UnitG = 4
Du = (Val(Trim(Form1.HXZLtxt.Text)) - 90) * PI / 180

With Huan
.Shape = 3
.Width = 2000
.Height = 2000
.FillStyle = 1
End With

L = Huan.Width / 2
H = Huan.Height / 2

With Zhen
.BorderWidth = 1
.X1 = Huan.Left + L
.Y1 = Huan.Top + H

.X2 = .X1 + L * Math.Cos(Du)
.Y2 = .Y1 + H * Math.Sin(Du)
End With

InitePan = IIf(Val(Trim(Form1.HXZLtxt.Text)) > 0, "正转向右", "逆转向左") & Trim(Form1.HXZLtxt.Text) & "度"

End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?