HELP ME PLS!!!!!!!!!!!!!!!!!!!!!Student with problem
how to write a 4 bit counter using visual basic. like when i press up, it will change from 0000 to 0001 then up again from 0001 to 0010 so on and so forth. thanks for helping me out its for my school assignment.i am stuck with this. thanks once again. pls email the sample code to [email protected]
not so cumbersome as it looks
Code:
Private Sub Command1_Click()
Static x&, a(7) As Byte
x = x + 1
a(0) = 48 - CBool(x And 8)
a(2) = 48 - CBool(x And 4)
a(4) = 48 - CBool(x And 2)
a(6) = 48 - CBool(x And 1)
Caption = CStr(a)
End Sub