PDA

Click to See Complete Forum and Search --> : Utility: CafChat - Simple P2P LAN Chat [VB6]


dilettante
Oct 11th, 2009, 05:41 PM
This project should be useful as a utility and also as a source of sample code for using Mailslots in VB6 programs. The Mailslot.ctl in this Project should prove usuable for most simple applications of Mailslots in VB6. Just copy Mailslot.ctl and Mailslot.ctx to your Project folder and then use Add file... to add the control.

The precompiled binary files were scanned with AVG Free 8.5 and should prove virus-free.


Description
CafChat 1.1 is a basic P2P LAN chat applet. It allows users at multiple different machines within the same Domain or Workgroup to chat with each other.

If left running or if a shortcut is placed in the Start Menu's Startup folder, CafChat can be used as a simple alternative to the Messenger Service and NET SEND commands. Windows Vista and later do not include those tools. Unlike using MSG.EXE which is not part of Vista Home editions CafChat does not require that Terminal Services/Remote Desktop be installed and running.

Because of the way it uses Mailslots only one copy can be run on each machine. This makes it unsuitable for Terminal Servers. Aside from basic testing two machines or a second machine in a VM are required. The machines must have Windows Networking (File and Print Sharing) enabled, and the firewalls must allow it through. Verifying this is important since it is the most likely source of failure.


Features

Simple short-message chatting among multiple parties.
Send on "enter" (no need to click the Send button).
List of active users, showing username@computername.
Regular message Send plus Alert send. Alert will flash the taskbar button of minimized peers.
Lightweight (61K plus 212K richtx32.ocx).


Author
Bob Riemersma


System Requirements
Enclosed precompiled binary uses registration-free COM, which allows it to be stored on removable media and run without installation on Windows XP or later. Tested on XP SP3, Vista SP2, and Windows 7 RC.

For best results the VB6 SP6 runtime (http://www.microsoft.com/downloads/details.aspx?FamilyId=7B9BA261-7A9C-43E7-9117-F673077FFB3C&displaylang=en) is recommended. Deploying the precompiled binary to XP or later is simple. Just copy the "bin" folder contents to a hard drive or flash drive location. If installing on a hard drive you may wish to create a shortcut on your desktop, which can be dragged or copied to your Start Menu as well.

It should be possible to recompile and package CafChat for formal installation on Windows 9x, 2000, and later.


License
Unencumbered public domain freeware. May be used by anyone in whole or in part in either source or binary forms. No guarantees or support offered. CafChat is made available as-is for use at your own discretion.

dilettante
Oct 12th, 2009, 10:02 AM
Just clarifying a few things:

No, there is nothing special about the Send button being the default control and letting you use Enter to Send. Amazing how many people will "type type, grab mouse and click default button" though if you don't state this.

There is zero configuration required. As long as the machines are in the same "space" (Workgroup or Domain) and the firewalls are open to File and Printer Sharing it should just work. It does not use any dedicated TCP or UDP ports besides those already in use by Windows Networking.

No, it does not work across the Internet unless you are using a VPN or something to extend your LAN across it. The broadcasts it uses will not normally traverse in-house routers either. You will likely find it confined to the LAN segment (as joined via hubs and switches).

dilettante
Aug 3rd, 2010, 06:10 PM
Here is a rewrite that incorporates numerous suggestions to simplify the program for use by end users:

User names have been simplified by dropping the suffix @computername due to numerous requests.
Sending in "alert" mode has been dropped because users had no practical use for it and found alert messages annoying.
Mailslot machine to machine limits and message truncation are handled in a more reliable manner. On sending a long message that gets truncated the sending user is now warned.
In some network environments Mailslot messages arrive duplicated. Duplicates are detected and silently dropped now.
A timestamp prefix has been added to displayed messages.
A splitter bar is now available, allowing the Users list to be resized.
Where practical, CafChat 2.0 will interoperate with existing CafChat 1.x peers.

In this Zip archive there is a subfolder named CafChat that contain a precompiled, XCopy-deployable program. This is the same as the "bin" folder in the previous version, which seemed to confuse people.

Just copy this CafChat folder to your hard drive or USB flash drive and run it from there.


Remember, since you have the full source you can restore earlier features or add new ones. If you are not a VB6 programmer and don't have the necessary tools and compiler license yourself there are many VB6 programmers who can make custom changes at quite reasonable costs.

dilettante
Aug 3rd, 2010, 06:20 PM
Before anyone asks, splitter bars are used to adjust multiple "panels" within windows. You click and hold on them and then you can drag them to resize the regions that they split. So here we can change the width of the Users list relative to the chat log area.