Valhalla Legends Forums Archive | General Programming | simple question

AuthorMessageTime
gotcha_ass
ok I am working on a parser for my chat client (right now just the CHAT protocol) and at the beginning of the class module that does all the parsing I declare all the eventIDs as Public Events. Then when it parses it uses RaiseEvents, my question is where do I put the event handlers for each event? And what format do I use??
Thanks ahead of time.
February 3, 2003, 1:49 AM
Grok
When you instantiate an object of your class, use the WithEvents keyword in the declaration.  Then in your object dropdown choose the name you just declared.  This will populate the procedures dropdown box with the events and public procedures of your class.

The format of each call depends on the definitions in your class, but don't worry, it will automatically write the declaration when you choose it in the dropdowns.
February 3, 2003, 2:23 AM
gotcha_ass
Im sorry but you lost me. I havent done much programming w/ ClassModules.

Im not getting the first sentence, the rest I got.
February 3, 2003, 3:33 AM
Grok
Why are you even using RaiseEvent if you don't know what it is for or how it is used?
February 3, 2003, 12:23 PM
gotcha_ass
B/C thats what the example code im using suggests and I dont know another way to do it

Modify: Wait, yes I do, but I dont know how to convert them from the RaiseEvent to just using a normal event.
February 3, 2003, 5:56 PM
gotcha_ass
nevermind, I found an example source code at planetsourcecode.com.

I dont know why I keep asking questions here, I answer most of them myself.
February 3, 2003, 6:07 PM

Search