Sub Globals
Dim EditText_save_ip1 As EditText
Dim EditText_save_ip2 As EditText
Dim EditText_save_ip3 As EditText
Dim EditText_save_ip4 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
EditText_save_ip1.InputType = EditText_save_ip1.INPUT_TYPE_NUMBERS
EditText_save_ip2.InputType = EditText_save_ip2.INPUT_TYPE_NUMBERS
EditText_save_ip3.InputType = EditText_save_ip3.INPUT_TYPE_NUMBERS
EditText_save_ip4.InputType = EditText_save_ip4.INPUT_TYPE_NUMBERS
end sub
Sub EditText_save_ip1_TextChanged (Old As String, New As String)
Select Case EditText_save_ip1.text.Length
Case 0,1,2,3
Case Else
EditText_save_ip1.text=Old
End Select
ServerIp=iptext(EditText_save_ip1.text,EditText_save_ip2.text,EditText_save_ip3.text,EditText_save_ip4.text)
End Sub
'------------------ip2---------------------
Sub EditText_save_ip2_TextChanged (Old As String, New As String)
Select Case EditText_save_ip2.text.Length
Case 0,1,2,3
Case Else
EditText_save_ip2.text=Old
End Select
ServerIp=iptext(EditText_save_ip1.text,EditText_save_ip2.text,EditText_save_ip3.text,EditText_save_ip4.text)
End Sub
'------------------ip3---------------------
Sub EditText_save_ip3_TextChanged (Old As String, New As String)
Select Case EditText_save_ip3.text.Length
Case 0,1,2,3
Case Else
EditText_save_ip3.text=Old
End Select
ServerIp=iptext(EditText_save_ip1.text,EditText_save_ip2.text,EditText_save_ip3.text,EditText_save_ip4.text)
End Sub
'------------------ip4---------------------
Sub EditText_save_ip4_TextChanged (Old As String, New As String)
Select Case EditText_save_ip4.text.Length
Case 0,1,2,3
Case Else
EditText_save_ip4.text=Old
End Select
ServerIp=iptext(EditText_save_ip1.text,EditText_save_ip2.text,EditText_save_ip3.text,EditText_save_ip4.text)
End Sub
Public Sub iptext(iptext1 As String, iptext2 As String , iptext3 As String, iptext4 As String)As String
Dim t As String
t=iptext1 & "." & iptext2 & "." & iptext3 & "." & iptext4
t= t.Replace(" ","")
Return t
End Sub