| 发表于:2007-06-03 16:37:55 楼主 |
已知下程序,text1输出为801.3 private sub command1_click() dim arr(1 to 8) as byte dim receiveresult as variant 'hial上限警报 arr(1) = &h81 arr(2) = &h81 arr(3) = &h52 arr(4) = &h1 arr(5) = &h0 arr(6) = &h0 arr(7) = &h53 arr(8) = &h1 mscomm1.output = arr if mscomm1.inbuffercount > = 10 then receiveresult = mscomm1.input text1.text = (receiveresult(7) * 256 + receiveresult(6)) / 10 end if end sub private sub form_load() mscomm1.commport = 1 mscomm1.settings = "9600,n,8,2 " mscomm1.inputmode = cominputmodebinary mscomm1.portopen = true mscomm1.inbuffercount = 0 end sub 当改成 arr(4) = &h2 arr(8) = &h2 text1输出为100 我要同时输出这两个结果(即text1输出为801.3,text2输出为100) 请问高手该怎么办啊? |
|
|
|
|