Communicating Between Multiple Projects

V

Veleek

An alternate title for this might be "Creating my own set of core
classes".

Just a quick overview. In order to learn C#, Sockets, Multithreading
and whatever else I can, I am attempting to create MSN Messenger (My
Sucky New Messenger), ie. a simple IM program as it is a interesting
way to incorporate all of the project. This will utilize a server
which all the useres will connect to in order to determine who is
online. After users have connected they will be able to open up
seperate windows in order to chat with other users. The person running
the server will also be able to open up chat windows with the users.

Now my question is this: Both the client and server have the ability to
chat, so for consistancy, I would like it to just use the same window
form. Plus I will be passing user and messages back and forth and
would like to pass objects instead of just using strings.

How can I create a series of common classes and structures (including
my 'Chat' window) that I can share among each of the applications. Is
this as simple as creating a new project in the same solution? This is
what I have done for creating the main Client/Server portions. If so,
how can I start BOTH applications at the same time through VC#?

I was having problems deciding which board this message would be better
suited for
 
V

Veleek

Sorry, Accidental post there. Just let me complete this.

I was having problems deciding which board this message would be better
suited for, a language one or a VisualStudio one as it's kinda sitting
right on the edge.

I would appreciate any help or suggestions. Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

Veleek,

For something like this, you want to create a library project. You can
put your common functionality in this project and then you can add a
reference to the output (or the project itself) as well. Then, you can
share the functionality between any other projects you have.

Also, as a side note, there are API's in windows that allow you to
handle messaging functionality pretty easily (which MSN messenger is based
on). You would have to access this functionality through COM interop. The
reference for the APIs are at (watch for line wrap):

http://msdn.microsoft.com/library/d...winmessenger/winmessenger/messenger_entry.asp

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top