From should be designed in such a way that all the controls should be located centrally in every size of the form.
Ans
Dim t As Integer
Dim d, num, sum As Single
Private Sub cmdClear_Click()
txtBinary. Text = Clear txtValue .Text = Clear
End Sub
'Logic To Convert Decimal To Binary Private Sub cmdConvert_Click()
t = 1
sum =0
num = CInt(txtValue.Text)
n = num
While Not num = 0 d = num Mod 2 sum = sum + (d * t)
t = t * 10
num = num \ 2
Wend
txtBinary.Text = CStr(sum)
End Sub
No comments:
Post a Comment