![]() |
|
Emoticons in Chat - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Emoticons in Chat (/showthread.php?tid=23) |
Emoticons in Chat - Tutorial Bot - 01-06-2006 Author: ? (unknown) Difficulty: 2/5 WARNING: This took me four hours to do, and I suggest you make a backup of modText.bas. USE AT YOUR OWN RISK! This is commented, so I don't think that I should get to bombarded with questions. Alright, this will add emoticon support to your client, but if the users actually click on an emoticon, they will see that they can "play" with it a bit, that is the only draw back so far. I am trying to come up with a way to use HTML and the IE control for better support... 1. Open frmMirage in Visual mode 2. Add in a picture box, named picBuffer, and set .visible to FALSE 3. Add in a frame, named frmIcon, and set .visible to FALSE 4. On frmIcon, make an INDEXED image (as many as you want for emoticons), named imgIcon. Okay, now go to modText, and find AddText, and Delete everything in there, and put this in. Code: Public Sub AddText(ByVal Msg As String, ByVal Color As Integer)Add the following to modDeclares: Code: Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongAdd the following to modConstants: Code: Public Const WM_PASTE = &H302Okay, now this is the catch. imgIcon MUST have BMPs, JPGs or GIFs in it, with there background colors done to the same color as your txtChat backcolor. |