• Log in or sign up for an account here: https://www.sythe.org/login

Output in a textbox

syth4

Active Member
Joined
Jan 28, 2007
Sythe Gold
1
Messages
173
Output in a textbox
Hi...
I need to know how to get the output of a ping test using this:

Dim siteResponds As Boolean = False
siteResponds = My.Computer.Network.Ping("IP")

or to a text file thanks :)
 
Output in a textbox
This is a code to save to a textfile using a commondialog control:
Code:
Private Sub Command1_Click()
Dim filelocation As String

CommonDialog1.ShowSave

filelocation = CommonDialog1.FileName

                      'append instead of output= update file
Open filelocation For Output As #1
    Print #1, Text1.Text

Close #1
End Sub
 
Output in a textbox
use ini, easier
 
Output in a textbox
Hi...
I need to know how to get the output of a ping test using this:

Code:
Dim siteResponds As Boolean = False
        siteResponds = My.Computer.Network.Ping("IP")

or to a text file thanks :)

umm dude, are you sure your using vb6? or do you have vb 2005?

EDIT:
use ini, easier

Ini's are only easier when your going to be reading and writing to files constantly and have several values to save / retrieve. otherwise you have to add a whole class module just for a small thing like above.
 
Output in a textbox
i read your other thread, this only says true or false depending on if the ping was successful, not the speeds, etc.
so i dont know, but here.

Code:
TextBox1.Text = My.Computer.Network.Ping("IP")

or with your way.
Code:
Dim siteResponds As Boolean = False
siteResponds = My.Computer.Network.Ping("IP")
TextBox1.Text = siteResponds
 
Runescape Gamblingrunescape gambling
Back
Top