The code below is program one - the client
Class TCPCli
SharedSub Main()
Dim tcpClient AsNew System.Net.Sockets.TcpClient
tcpClient.Connect("127.0.0.1", 8000)
Dim networkStream As NetworkStream = tcpClient.GetStream()
If networkStream.CanWrite And networkStream.CanRead Then
' Do a simple write...
Thank you. That corrected the message. Now I just have to get both programs connected. Using pcs as client server, should I convert my project to a console application?
Thank you.
project
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after...
Thank you
That shifted the blue lines. Thank you.
If i am supposed to run these one of these programs on one PC - the client and the other on another pc - the server....should I change these to console applications rather than windows applications?
Thank you once again.
Regards.:)
thank you
that removed the blue lines.
daft question but should I convert my application to a console application rather than a windows application?
Regards,
Robert.
Hi,
I am having trouble with outputting a label on screen.
Basically
lblwimax.Text = "This distance is " & distance & "miles. Will there be a sigal strength? " & signal
signal does not exist as such and has a blue line under it. the program still runs though. I enter distance as a value...
Hi,
I got the first code to work....
The second program, which would be the server program has a problem with:
const port as integer = 8000
dim tcpListener as TcpListener(port)
error when place cursor red tcplistener is 'public sub new(port as integer) is obsolete: Use TcpListener(ipaddr...
class
Hi,
So if i put public or private before class then it should solve the problem? Or should I put the imports statements at the top of the code?
Thank you for your help, it will be much appreciated if I can get it working and even if i can't its still a good try :)
Regards.
need a little help
Hi,
I found code at the following link, so have copied it into mine.
http://www.eggheadcafe.com/articles/20020323.asp
Problem 1: Imports error - statements must precede any declarations. What have i missed?
Problem 2. Dim Networkstream as NetworkStream - type...
Hi,
A lecturer told me last night that I could use something called Winsock in vb.net? what is it and how do I get it to work?
basically, one program will reside on the client pc and the other on the server pc. The one on the client will send a number to the one on the server pc and the...
thank you.
Hi,
Thats getting there. I think i may have been misled by a lecturer at uni who said it was approx four lines of code. Grrrr!!!
Wait till i see him Tuesday lol....
ooops missed a bit
Hi,
I wish to pass a user input(integer) from the first program to the second program. The second program sends back an answer to the first program either yes or no depending on the integer.
Does this help you to help me?
The imports - would they go into the first...
Hi,
I have two vb.net programs I have to get to talk too each other. How do I do this? I have to keep them seperate.
Then how do I get them to communicate across two seperate PCs? ie one on one pc and the other on another pc.
Thank you for your help. I look forward to your...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.