Results 1 to 5 of 5
  1. #1
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh

    [Help]Can't Show Form[solved]

    Code:
        Dim ipaddress As New IPAddress(Convert.ToByte("localhost"))
        Dim lister As New Net.Sockets.TcpListener(IPAddress, port.Text)
        Dim mySocket As Socket = lister.AcceptSocket()
    
        Public Sub StartServer()
            Dim getstatus As Byte() = {&HFF, &HFF, &HFF, &HFF, &H0}
            Dim getinfo As Byte() = {&HFF, &HFF, &HFF, &HFF, &HFF, &H0}
    
            lister.Start()
            mySocket.Receive(getstatus, 0, SocketFlags.None)
            mySocket.Receive(getinfo, 0, SocketFlags.None)
            log.Text = "Recieved packet of data from " & mySocket.AddressFamily.ToString()
            While True
    
            End While
        End Sub
    When I add that code(incomplete) it shows me an error:
    An error occurred creating the form. See Exception.InnerException for details. The error is: Input string was not in a correct format.
    What do to please? I can't start my form.

  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Where are you adding the code?

    I would assume in a separate class, or is this a console application.
    I would hope that you didn't place it in designer

    The source by itself lands no issues in a class, module, console application , or form source. So the source isn't the issue, where are you putting it? and when you remove the source, the form shows?





     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    yes it shows, and not in the designer damn it dude, im a starter not a noob
    and I fixed it. Just need a bit more time to set the IP Address of the Lister...Blocked on it But will work on it XD

  4. #4
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    So, you solved it?

  5. #5
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    yes ^^ It's ova!!!