Click here to Skip to main content
15,914,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Displaying how many users are currently logged into a web application - Please help [modified] Pin
nlarson1117-Mar-08 16:10
nlarson1117-Mar-08 16:10 
GeneralThere is no row at position 0 Pin
AAGTHosting17-Mar-08 7:03
AAGTHosting17-Mar-08 7:03 
GeneralRe: There is no row at position 0 Pin
Dave Kreskowiak18-Mar-08 3:03
mveDave Kreskowiak18-Mar-08 3:03 
GeneralDropdown list remains visible Pin
cstrader23217-Mar-08 5:07
cstrader23217-Mar-08 5:07 
GeneralRe: Dropdown list remains visible Pin
Dave Kreskowiak18-Mar-08 2:56
mveDave Kreskowiak18-Mar-08 2:56 
Generalnetwork sockets Pin
Cory Kimble17-Mar-08 4:29
Cory Kimble17-Mar-08 4:29 
GeneralRe: network sockets Pin
Dave Kreskowiak18-Mar-08 3:28
mveDave Kreskowiak18-Mar-08 3:28 
GeneralRe: network sockets Pin
Cory Kimble18-Mar-08 4:34
Cory Kimble18-Mar-08 4:34 
Thank you for helping me on this. But, I get an error on the second line of code: target machine actively refused it.

Let me show you how I have this set up so you can clearly see any problems.

Server - My PC on a network separate application of desktop where listener is
Code:
Dim desktop As SteidingerDesktop = New SteidingerDesktop
        Dim localhostAddress As IPAddress = IPAddress.Loopback
        Dim tcpList As New TcpListener(localhostAddress, 2048)
        tcpList.Start()
        Do
            Dim tcpcli As TcpClient = tcpList.AcceptTcpClient
            Dim ns As NetworkStream = tcpcli.GetStream
            Dim sr As New StreamReader(ns)
            Dim receivedData As String = sr.ReadLine()
            Dim result As Boolean

            If receivedData <> "" Then
                'Test the received data to see which function to call
                If receivedData = "BUYER" Then
                    result = desktop.getBuyers()
                ElseIf receivedData = "SHIP" Then
                    result = desktop.updateShip()
                ElseIf receivedData = "MOVE" Then
                    result = desktop.updateMove()
                ElseIf receivedData = "PHYINV" Then
                    result = desktop.updatePhyInv()
                End If


                Try
                    ' resultData = file.ReadAllText(fileName)
                Catch ex As Exception
                    'send back result        result = "ERROR"
                End Try
                'Send result
                SendData(ns, result)

            End If
            sr.Close()
            ns.Close()
            tcpcli.Close()
            If receivedData = "" Then Exit Do
        Loop

        tcpList.Stop()



Client - mobile device barcode scanner on wireless
Code:Your code.

Dim tcpClient As New System.Net.Sockets.TcpClient()
        tcpClient.Connect("ipaddress of my desktop", 2048)

        Dim networkStream As NetworkStream = tcpClient.GetStream()
        If networkStream.CanWrite And networkStream.CanRead Then

            Dim sendBytes() As Byte = Encoding.ASCII.GetBytes("Buyer")
            networkStream.Write(sendBytes, 0, sendBytes.Length)

            Dim bytes(tcpClient.ReceiveBufferSize) As Byte
            networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))

            Dim returndata As String = Encoding.ASCII.GetString(bytes, 0, bytes.Length)

        End If


Can you look at this code and tell me why I get the error? thank you. Big Grin | :-D
QuestionDrawing in user control Pin
N!ck17-Mar-08 4:03
N!ck17-Mar-08 4:03 
GeneralRe: Drawing in user control Pin
Dave Kreskowiak17-Mar-08 7:44
mveDave Kreskowiak17-Mar-08 7:44 
GeneralRe: Drawing in user control Pin
Christian Graus17-Mar-08 9:21
protectorChristian Graus17-Mar-08 9:21 
GeneralTo get the snap shot of other machine Pin
sjs4u17-Mar-08 2:30
sjs4u17-Mar-08 2:30 
GeneralRe: To get the snap shot of other machine Pin
Dave Kreskowiak17-Mar-08 7:40
mveDave Kreskowiak17-Mar-08 7:40 
GeneralRe: To get the snap shot of other machine Pin
Christian Graus17-Mar-08 9:22
protectorChristian Graus17-Mar-08 9:22 
QuestionMSN Messenger Live Contacts Lits Pin
dunca_roo17-Mar-08 2:22
dunca_roo17-Mar-08 2:22 
GeneralRe: MSN Messenger Live Contacts Lits Pin
Dave Kreskowiak17-Mar-08 7:42
mveDave Kreskowiak17-Mar-08 7:42 
GeneralDynamically load the exe and run Pin
sjs4u16-Mar-08 23:26
sjs4u16-Mar-08 23:26 
GeneralRe: Dynamically load the exe and run Pin
Christian Graus16-Mar-08 23:48
protectorChristian Graus16-Mar-08 23:48 
AnswerRe: Dynamically load the exe and run Pin
Rajesh Anuhya17-Mar-08 0:07
professionalRajesh Anuhya17-Mar-08 0:07 
GeneralRe: Dynamically load the exe and run Pin
sjs4u17-Mar-08 0:33
sjs4u17-Mar-08 0:33 
GeneralRe: Dynamically load the exe and run Pin
Christian Graus17-Mar-08 0:40
protectorChristian Graus17-Mar-08 0:40 
GeneralRe: Dynamically load the exe and run Pin
Rajesh Anuhya17-Mar-08 0:49
professionalRajesh Anuhya17-Mar-08 0:49 
GeneralRe: Dynamically load the exe and run Pin
sjs4u17-Mar-08 0:57
sjs4u17-Mar-08 0:57 
QuestionHash Code for an image Pin
kumarrpt16-Mar-08 23:17
kumarrpt16-Mar-08 23:17 
GeneralRe: Hash Code for an image Pin
Christian Graus16-Mar-08 23:50
protectorChristian Graus16-Mar-08 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.