473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Network Application - basic question

How do I communicate between different user instances of my windows
forms project?

Im trying to write a program that will run on a network of 15 pcs.

5 of the pc's will run the admin part of the program. and the rest of
the pc's will run the salesman part of the program.

Both forms (the admin form, and the salesman form) at this stage are
VERY simple as i'm just trying to learn the mechanics between basic
form communication accross the network.

The admin form has a couple of labels, a text box and a drop down box.
The text box allows the admin person to enter a leads name, and the
dropdown box allows the admin person to select which salesman they want
to send the lead to. Then when they press OK here is what i need to
happen...

Lets say from the dropdown box they selected the salesman called JOHN.

On Johns PC the app will popup a box alerting him that he has an
incoming lead.

It then pops up the salesman form, with the previously entered customer
name already populated and the time and date info also populated from
the data the admin person entered before they sent him the lead.

Can someone please explain how I achieve the above. I can create the
forms with no problems of course, but my question is asking about the
network side of things and how i actually get the forms to communicate
with each other / and find the right users form to activate.

Many Thanks.

Nov 21 '06
10 3328
Hi,
And am getting the error 'the name ChannelServices ' does not exist in
the current context.
You're missing another "using" directive:

using System.Runtime. Remoting.Channe ls;

These directives tell the C# compiler where to look for unqualified tokens
in the code such as, "ChannelService s", which is located in the namespace
I've given above. Without telling the compiler to look in that namespace
the ChannelServices class won't be found.
And also System.Runtime. Remoting.Remoti ngServices does not contain a
defintion for RegisterWellKno wnType.
System.Runtime. Remoting.Remoti ngServices does not contain a member named
RegisterWellKno wnType :)

You probably want the RegisterWellKno wnServiceType method.

If you're not using Visual Studio then you can still discover the members of
any Type in the framework on http://msdn.microsoft.com; just search for the
name of the class in which you're interested and click the link that looks
like, "TheClassNa me Class" or "TheClassNa me Members", for example.

A better approach might be to install Visual C# 2005 Express:

"Visual C# 2005 Express"
http://msdn.microsoft.com/vstudio/express/visualcsharp/

Intellisense would have helped you solve the last problem far quicker than
newsgroups, I'm sure. The Object Browser or the new smart tag feature could
have easily helped you solve the first problem.

--
Dave Sexton

"CCLeasing" <ga**@ccleasing .co.ukwrote in message
news:11******** *************@j 44g2000cwa.goog legroups.com...
Thanks very much - in future i will post in that group.

I have tried your change and now am getting a different error.

I now have: -

---
using System;
using System.IO;
using System.Runtime. Remoting;
using System.Runtime. Remoting.Channe ls.Http;
namespace Server
{
public class ServiceClass : MarshalByRefObj ect {
public void AddMessage (String msg)
{
Console.WriteLi ne (msg);
}
}
public class ServerClass
{
public static void Main ()
{
HttpChannel c = new HttpChannel (1095);
ChannelServices .RegisterChanne l (c);
RemotingService s.RegisterWellK nownType
("Server","Serv er.ServiceClass ","ServiceClass ",WellKnownObje ctMode.Singleto n);
Console.WriteLi ne ("Server ON at 1095");
Console.WriteLi ne ("Press enter to stop the server...");
Console.ReadLin e ();
}
}
}
===========
And am getting the error 'the name ChannelServices ' does not exist in
the current context.

And also System.Runtime. Remoting.Remoti ngServices does not contain a
defintion for RegisterWellKno wnType.
==============

Thanks Again-

Nov 21 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
50590
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") sPwd = inputbox("Enter password") WshNetwork.MapNetworkDrive "J:", "\\server1\data", false, "xyz_net\John", sPwd Msgbox "Drives has been map successful"
1
2244
by: Neel Word | last post by:
I need to develop an application (development platform: Win2000; target platform: Win98/ME/NT4/2000/XP), which would require file transfer functionality over dial-up and network. We could develop on .NET (1.1 or 1.0 - VS.NET 02/03) or using plain COM (visual c++). We'd prefer .NET though. Does anyone know of any products or COM API (or .NET classes) that can easily handle file transfer over dial-up
5
3661
by: Mike McIntyre [MVP] | last post by:
I am working on an issue where and ASP.NET web application on one computer (A) needs to access files on a network mapped drive (B). This application uses as DSN on (A) that maps a proprietory ODBC driver to data on a (B). The DSN directory path points to mapped network drive mounted on (A). When the ASP.NET application reaches the point where the ODBC drive is called to fill a DataSet it throws the following exeption:
5
3112
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to impersonate a user and obtain network credentials using the DuplicateTokenEx call with appropriate parameters even though the call seems to not fail. I check my identity has changed but can only still do local commands. I would consider...
14
2325
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the .exe (on the network drive, on the server) "Full Trust." From the client, double-click on the ..exe (on the network drive, on the server) and it runs fine. So far, so good, but... On the server, where I've installed not VB.NET but .NET
2
1533
by: mark | last post by:
Hi, I am in the process of developing a small application that sits in the task bar and at a set interval polls an IIS web server for information. The process involves the client sending anything between 3 and 30 characters of data and the server returning anything up to 50 characters of data. I need to identify the overhead on the network so I can determine the network utilisation of the application. The sort of questions I need to be...
15
1777
by: itschy | last post by:
Hi. I have a couple of nodes (just ids, no coordinates whatsoever) and links betweens them (weighted). Is there any existing solution to visualize this network in php? Thanks itschy
6
2308
by: Tony | last post by:
Hello! This is the scenarion that we want to implement. We have a computer called A which register itself on a superviser server about it's existence so other computer can get the identification about computer A. Now computer B wants to communicate with computer A so computer B ask the superviser server about the identification for computer A so B can start communicate with computer A.
4
2926
by: james457 | last post by:
Hi all, I am writing a linux testbed for wireless sensor networks. The core objective is to test data transfer between any two nodes. The network runs using tree topology. One node in the network is the "Driver". This node is connected using serial port to a linux PC. What I am trying to write is the software on this linux PC that will drive data transfer in the network. The "Driver" node, taking commands from the software running on...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.