改成
Private Sub txtPort_KeyPress(KeyAscii As Integer)
if keyascii<48 then
txtport.text=""
KeyAscii=0'加上这句就行了
end ifEnd Sub
Private Sub txtPort_KeyPress(KeyAscii As Integer)
if keyascii<48 then
txtport.text=""
KeyAscii=0'加上这句就行了
end ifEnd Sub
if keyascii<48 then
keyascii=0
end ifEnd Sub