作者oycoyc (.......)
看板Visual_Basic
标题[VB6 ] 初学者问题
时间Sat Aug 27 21:00:01 2005
Private Sub HScroll1_Change()
Dim thou As Integer
Dim hund As Integer
Dim dec As Integer
Dim uni As Integer
Dim tem1 As Integer
Dim tem2 As Integer
uni = HScroll1.Value Mod 16
tem1 = HScroll1.Value / 16
dec = tem1 Mod 16
tem2 = tem1 / 16
hund = tem2 Mod 16
thou = tem2 / 16
Label3.Caption = uni
Label2.Caption = tem1
Label4.Caption = HScroll1.Value
End Sub
----------------------------------------------------------------------
以上,
为何当HScroll1.value数到9的时候,tem1就变1了?
应该是HScroll1.value数到16的时候才会加1啊?
是哪里出问题了??
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.28.161
1F:推 fumizuki:改用整数除法运算子吧 210.58.156.43 08/27
2F:推 oycoyc:喔..我把 / 和 \ 搞混了...... 140.113.28.161 08/27
3F:→ oycoyc:太感谢了 140.113.28.161 08/27