Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Knowledge Base

Post new topic   Reply to topic
Get your External IP
View previous topic :: View next topic  
Author Message
Blaz3
Guest





PostPosted: Dec 18th, 2003 04:28 PM    Post subject: Get your External IP Reply with quote

Code:

'Controls are:
'Command button - cmdClear
'Command button - cmdGet
'Textbox - txtIP
'Inet control - Inet1
Private Sub cmdClear_Click()
    On Error GoTo Error
    txtIP.Text = ""
    Me.Caption = "Ready"
    Exit Sub
Error:
    MsgBox Err.Description, vbCritical, "Error"
End Sub

Private Sub cmdGet_Click()
    On Error Resume Next
    txtIP.Text = Inet1.OpenURL("http://dynupdate.no-ip.com/ip.php")
    Exit Sub
End Sub

Private Sub Form_Load()
    On Error GoTo Error
    Me.Caption = "Ready"
    Exit Sub
Error:
    MsgBox Err.Description, vbCritical, "Error"
End Sub

Private Sub Inet1_StateChanged(ByVal State As Integer)
    On Error GoTo Error
    If State < 10 Then
        Me.Caption = "Working..."
    ElseIf State = 10 Then
        Me.Caption = "Done."
    End If
    Exit Sub
Error:
    MsgBox Err.Description, vbCritical, "Error"
End Sub
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Knowledge Base All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic