Call Mech_Calculation(Xa, Ya, AB, BC, CI, IH, HG, angXAB, angABC, angBCI, angCIH, angHIG, Xb, Yb, Xc, Yc, Xi, Yi, Xh, Yh, Xg, Yg)
Private Sub Mech_Calculation(ByVal X_a As Single, Y_a As Single, ByVal AB As Single, ByVal BC As Single, ByVal CI As Single, ByVal IH As Single, ByVal HG As Single, ByVal ang_XAB As Double, ByVal ang_ABC, ByVal ang_BCI, ByVal ang_CIH, ByVal ang_IHG As Double, ByRef X_b As Single, ByRef Y_b As Single, ByRef X_c As Single, ByRef Y_c As Single, ByRef X_i As Single, ByRef Y_i As Single, ByRef X_h As Single, ByRef X_f As Single, ByRef Y_f As Single, ByRef X_d As Single, ByRef X_e As Single, ByRef Y_e As Single, ByRef X_f As Single, ByRef Y_f As Single)
Dim PI As Double
PI = 3.1415926
X_b = X_a + AB * Cos(ang_XAB * PI / 180)
Y_b = Y_a + AB * Sin(ang_XAB * PI / 180)
X_c = X_b + BC * Cos((ang_XAB + ang_ABC) * PI / 180)
Y_c = Y_b + BC * Sin((ang_XAB + ang_ABC) * PI / 180)
X_i = X_c + CI * Cos((ang_BCI + ang_XAB + ang_ABC - 180) * PI / 180)
Y_i = Y_c + CI * Cos((ang_BCI + ang_XAB + ang_ABC - 180) * PI / 180)
X_h = X_i + IH * Cos((ang_BCI + ang_XAB + ang_ABC + angCIH - 180) * PI / 180)
Y_h = Y_i + IH * Cos((ang_BCI + ang_XAB + ang_ABC + ang_CIH - 180) * PI / 180)
X_g = X_i + HG * Cos((ang_BCI + ang_XAB + ang_ABC + angCIH + angIHG - 180) * PI / 180)
Y_g = X_i + HG * Sin((angBCI + ang_XAB + ang_ABC_angCIH_angIHG - 180) * PI / 180)
X_d = X_c - CI * Cos((ang_XAB + ang_ABC - ang_BCI) * PI / 180)
Y_d = Y_c + CI * Sin((ang_XAB + ang_ABC - ang_BCI) * PI / 180)
X_e = X_d + HI * Cos((ang_BCI + ang_CIH - ang_XAB - ang_ABC) * PI / 180)
Y_e = Y_d + HI * Sin((ang_BCI + ang_CIH - ang_XAB - ang_ABC) * PI / 180)
X_h = X_e + HG * Cos((ang_BCI + ang_CIH - ang_XAB - angABC + ang_IHG) * PI / 180)
Y_h = Y_e + HG * Sin((ang_BCI + ang_CIH - ang_XAB - angABC + ang_IHG) * PI / 180)
End Sub
为什么总是说缺少必选参数阿
vb 必选参数
答案:2 悬赏:60 手机版
解决时间 2021-03-23 07:24
- 提问者网友:蔚蓝的太阳
- 2021-03-22 22:48
最佳答案
- 五星知识达人网友:何以畏孤独
- 2021-03-22 23:19
你仔细看看调用 Mech_Calculation时给的参数够么,明显比定义的参数要少,过程既然未定义可选参数,那么参数要一一对应,缺省也要有","分隔符分隔
全部回答
- 1楼网友:未来江山和你
- 2021-03-22 23:29
是不是应为你没有定义啊
你按以下方法试试
dim second as long '直接整型的数就行
dim minute as long
private sub form_load()
second = 0
minute = 0
end sub
private sub timer1_timer()
second = second + 1 //这里提示必选参数
if second = 60 then
minute = minute + 1
second = 0
end if
label2.caption = minute + "分" + second + "秒"
end sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯