external ip adres - microsoft internet transfer control 6.0?
hello all
i'm making a program, wich has to show the external ip-adress.
i google'd alot for it, and i got a solution:
Code:
create a form
add a label, command box, and the Microsoft Internet Transfer Control 6.0
Then add this code
Option Explicit
Private Sub Command1_Click()
Dim Data As String
Data = Inet1.OpenURL("http://www.showmyip.com/simple/")
If Not Inet1.StillExecuting Then
Label1.Caption = Left(Data, InStr(Data, " ") - 1)
End If
End Sub
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_20932248.html
But the problem is, i don't know what the "Microsoft Internet Transfer Control" is, how i can use it and where i can find it. Could anyone explain me in simple steps how i have to use this, and maybe, how i can get above code working
thank u very much
-koffiedik
Re: external ip adres - microsoft internet transfer control 6.0?
Go to Project -> Components and select "Microsoft Internet Transfer Control 6.0" from the list and click OK. On the left side of the main screen a new control appears. Add it to the form.
Add a Command button and a Label to the form. Then add the following code, because "http://www.showmyip.com/simple/" doesn't work anymore.
Code:
Private Sub Command1_Click()
Dim Data As String
Data = Inet1.OpenURL("http://www.whatismyip.com/automation/n09230945.asp")
If Not Inet1.StillExecuting Then
Label1.Caption = Trim$(Data)
End If
End Sub
Re: external ip adres - microsoft internet transfer control 6.0?
ok thanks, but if i select
the MS internet control the program crashes.
i tried to google it, but i couldnt find any solution.
does anyone know this problem, and/or the solution?
-edit
i solved the crashed thingy
it seemed that the school administrator blocked some of those files that were needed -.-
at my home it just worked fine =D
thank you very much =D