作者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