⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module3.bas

📁 本软件为脚本导航
💻 BAS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -