求VB编程大神,求高手解答!!!急急急!!!
PrivateSubCommand1_Click()
DimmAsLong,nAsLong
m=Text1
n=Text2
Label3.Caption=m&"和"&n&"的最大公约数是"&gcd(m,n)
EndSub
PrivateSubCommand2_Click()
DimmAsLong,nAsLong
m=Text1
n=Text2
Text3=m&"和"&n&"的最大公约数是"&gcd(m,n)
EndSub
PrivateSubForm_Load()
Label1.Caption="第一个数:"
Label2.Caption="第二个数:"
Label3.Caption=""
Text1=""
Text2=""
Text3=""
Command1.Caption="标签显示结果"
Command2.Caption="文本框显示结果"
EndSub
Functiongcd(mAsLong,nAsLong)AsLong
r=mModn
Whiler>0
r=mModn
gcd=n
EndFunction