Results 1 to 3 of 3

Thread: Eh..

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    1

    Eh..

    Hey.. I'm really new to the whole Network VB programming, but.. I have a question..

    This code gives me the error::
    Code:
    Compile Error: Argument Not Optional..
    on the txtData.Text = .. line.

    VB Code:
    1. Private Sub cmdConnect_Click()
    2.  
    3. sock.RemoteHost = txtIP.Text
    4. sock.RemotePort = txtPort.Text
    5. sock.SendData (Chr(254) + Chr(253) + Chr(0) + Chr(126) + Chr(255) + Chr(255) + Chr(255))
    6.  
    7.  
    8. txtData.Text = sock.GetData()
    9.  
    10. End Sub

    How do I fix?


    Thanks,


    DF

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Eh..

    sock.GetData(txtData.Text)

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Eh..

    GetData is a method - you were calling it as if it were a function.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width