Private Sub Command1_Click()
Dim a As Single, vp As Single, vs As Single, vd As Single, Ed As Single, Gd As Single
a = Val(Text1.Text)
vp = Val(Text2.Text)
vs = Val(Text3.Text)
if (vp ^ 2 - vs ^ 2)<>0 then
vd = (vp ^ 2 - 2 * vs ^ 2) / ( (vp ^ 2 - vs ^ 2)*2)
Ed = a * vs ^ 2 * ( 3*vp ^ 2 - 4 * vs ^ 2) / (vp ^ 2 - vs ^ 2) / 1000
Gd = a * vs ^ 2 / 1000
Text4.Text = vd
Text5.Text = Ed
Text6.Text = Gd
Open "D:\VB98\土化实验\动参数1.doc" For Output As #1
Print #1, Text1.Text, Text2.Text, Text3.Text, Text4.Text, Text5.Text, Text6.Text
Close #1
end if