AYUDA CON ESTE CODIGO
BUENO PUES ESO ESTOY EMPEZANDO CON VISUAL BASIC Y NO CONSIGO HACER ESTO POR FAVORE A VER SI ME AYUDAIS PLIS GRACIAS DE ANTEMANO SE SUPONE QUE SE TENDRIA QUE MOSTRAR UN TXT CON MI IP A VER QUE HAGO MAL
Dim ti
Private Sub Command1_Click()
ti = ti + 1
Label1.Caption = ti
If ti = 10 Then
Open ("prueba.txt") For Output As #1
Print #1, winsock1.LocalIP
Close #1
End If
End Sub
Private Sub Form_Load()
ti = 0
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Call Command1_Click
End Sub
Dim ti
Private Sub Command1_Click()
ti = ti + 1
Label1.Caption = ti
If ti = 10 Then
Open ("prueba.txt") For Output As #1
Print #1, winsock1.LocalIP
Close #1
End If
End Sub
Private Sub Form_Load()
ti = 0
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Call Command1_Click
End Sub
buenas.
En el codigo ese no tienes nada que haga que un txt te muestre el IP.
Lo unico que haces es guardarlo en un txt. si quieres que te abra ese txt en el block de notas, usa shell, y si quieres leer el txt y pasar los datos a tu aplicacion usa Open
Saludos
En el codigo ese no tienes nada que haga que un txt te muestre el IP.
Lo unico que haces es guardarlo en un txt. si quieres que te abra ese txt en el block de notas, usa shell, y si quieres leer el txt y pasar los datos a tu aplicacion usa Open
Saludos
Private Sub Command1_Click()
ti = ti + 1
Label1.Caption = ti
If ti = 10 Then
Open app.path & "prueba.txt" For Output As #1
Print #1, winsock1.LocalIP
Close 1
End If
Agregué App.Path porque sino, guarda el archivo en el directorio actual del sistema operativo que no necesariamente es el mismo path de la aplicacion.
Saludos
ti = ti + 1
Label1.Caption = ti
If ti = 10 Then
Open app.path & "prueba.txt" For Output As #1
Print #1, winsock1.LocalIP
Close 1
End If
Agregué App.Path porque sino, guarda el archivo en el directorio actual del sistema operativo que no necesariamente es el mismo path de la aplicacion.
Saludos