Adblock breaks this site

Output in a textbox

Discussion in 'Programming General' started by syth4, Feb 19, 2007.

  1. syth4

    syth4 Active Member

    Joined:
    Jan 28, 2007
    Posts:
    173
    Referrals:
    1
    Sythe Gold:
    1
    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 :)
     
  2. Cheeter

    Cheeter Grand Master
    Cheetah Retired Global Moderator

    Joined:
    Jun 5, 2005
    Posts:
    3,851
    Referrals:
    1
    Sythe Gold:
    31
    Discord Unique ID:
    236215891849641985
    Discord Username:
    Charkel#8050
    Extreme Homosex Homosex
    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
    
     
  3. Puzzle

    Puzzle Apprentice

    Joined:
    May 6, 2005
    Posts:
    846
    Referrals:
    0
    Sythe Gold:
    0
    Output in a textbox

    use ini, easier
     
  4. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Output in a textbox

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

    EDIT:
    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.
     
  5. syth4

    syth4 Active Member

    Joined:
    Jan 28, 2007
    Posts:
    173
    Referrals:
    1
    Sythe Gold:
    1
    Output in a textbox

    vb 2005
     
  6. hmm

    hmm Active Member

    Joined:
    Jan 21, 2007
    Posts:
    181
    Referrals:
    2
    Sythe Gold:
    5
    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
    
     
  7. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Output in a textbox

    i thought as much, moved to the vb 2005 section
     
< getplayers function problem | I would like some help on vb2005 please >


 
 
Adblock breaks this site