帮忙看看如何触发combox中list里面的事件
Private Sub Comb1_Click()Dim B As Double, L As Double, n As Single, m As Single, eR As Double, X As Double, Y As Double, j As Double, f As Double
Dim z As Double, A As Double, e As Double, s As Double, h As Double, i As Integer
eR = 6378245
e = 2.718282
X = B / 180 * 3.14
Y = L / 180 * 3.14
B = Val(Text1.Text)
L = Val(Text2.Text)
s = 6367558 * X - 16000 * Sin(2 * X) + 20 * Sin(4 * X) - 0.022 * Sin(6 * X) + 0.00003 * Sin(8 * X)
n = 6367558 / (1 - 0.00669 * Sin(X) ^ 2) ^ (1 / 2)
m = e * e * Cos(X) * Cos(X)
If Combo1.Text = "正轴等角方位投影" Then
h = 2 * eR * Tan((3.14 / 2 - X) / 2)
If Combo1.Text = "正轴等积方位投影" Then
h = 2 * eR * Sin((3.14 / 2 - X) / 2)
If Combo1.Text = "正轴等距方位投影" Then
h = 2 * eR * ((3.14 / 2 - X) / 2)
End If
End Sub
Private Sub form_load()
Combo1.AddItem "正轴等角方位投影"
Combo1.AddItem "正轴等积方位投影"
Combo1.AddItem "正轴等距方位投影"
Combo1.ListIndex = 0
End Sub
Private Sub Command1_Click()
Text3.Text = h * Cos(Y) / 100000
Text4.Text = h * Sin(Y) / 100000
End Sub