by Ryan Stenhouse (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(9 Votes)

This control duplicates most of the functionality of the "Chat Logs" people will encounter in Chat or Instant Messenger applications.
It wraps functions, for special formatting of text, and has a full range of pre-defined events which also can be displayed.
It detects link starting with https://, and using the windows API, will detect when the link is clicked, and open it in Internet Explorer (Based on a submission by another VBCode User, who's name I have forgotten)
Useing the Tag property of elements in an image list control, this chat log can detect when pre-defined key combinations are present in the text, and replace them with "emoticons". This is done using more Windows API Calls.
See the demo application, and the screenshot for a much better (and more visual) description. This Chat Log control is similar to the one used in a Chat Client I am currently developing, for Ionic Roleplay at https://www.ionicrp.co.uk.
Assumes
Obviously, this code using the Rich Textbox Control, so please ensure you have it before attempting to run.
Side Effects
In some cases, if an idle IE Window is open, instead of opening a new IE instance to follow a link, the control will take over the running browser.
Download Rich Text Formatted Chat Pane, with Hyperlinks and Emoticons (160 KB)