Originally posted by vdraceil
I dont know how to display that here.
There doesnt come any option to copy the entire form...
If u tell me how to do that i can display the form design over here.
Public Class Form1
' declare two integers used to hold the in number and out number
Dim inno As Integer
Dim outno As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' when the button is clicked and the IF statement matches change outno to a value of inno x2
inno = Text1.Text
If "A" = "A" And "B" = "B" Then
outno = inno * 2
' change text2.text to show outno
Text2.Text = outno
End If
End Sub
End Class
Private inno As Integer Private outno As Integer
Public outno As String Public inno As String Public Sub Text1_Change() inno = Text1.Text End Sub Public Sub Command1_Click() If Option1.Value = True And Option4.Value = True Then outno = inno End If If Option2.Value = True And Option5.Value = True Then outno = inno End If If Option3.Value = True And Option6.Value = True Then outno = inno End If If Option1.Value = True And Option6.Value = True Then outno = hextobinary() End If Text2.Text = outno End Sub Public Sub Text2_Change() Text2.Text = outno End Sub Function hextobinary() Dim i As Integer Dim store As Long Dim reminder As String Dim quot As Integer Dim temp As String For i = 0 To 9 If (inno(i) >= 0 And inno(i) <= 9) Then store = store + inno(i) * pow(16, i) ElseIf (inno(i) = a) Then inno(i) = 10 store = store + inno(i) * pow(16, i) ElseIf (inno(i) = b) Then inno(i) = 11 store = store + inno(i) * pow(16, i) ElseIf (inno(i) = c) Then inno(i) = 12 store = store + inno(i) * pow(16, i) ElseIf (inno(i) = d) Then inno(i) = 13 store = store + inno(i) * pow(16, i) ElseIf (inno(i) = d) Then inno(i) = 14 store = store + inno(i) * pow(16, i) ElseIf (inno(i) = f) Then inno(i) = 15 store = store + inno(i) * pow(16, i) End If Next i If store! = 0 Then i = 0 Do reminder(i) = store Mod 2 quot = store / 2 i = i + 1 While quot! = 0 For j = 9 To 0 outno(i) = reminder(j) i = i + 1 j = j - 1 Exit For Return End Function
For n = 1 To inno.Length
value = (Mid(inno, n, 1))
' whatever it is that you wish to do with this value
Next
dim value(inno.length) as string
For n = 1 To inno.Length
value(n) = (Mid(inno, n, 1))
Next
For n = 1 To inno.Length
value = (Mid(inno, n, 1))
' whatever it is that you wish to do with this value
Next
dim value(inno.length) as string
For n = 1 To inno.Length
value(n) = (Mid(inno, n, 1))
Next
Comment