• Welcome to Valhalla Legends Archive.
 

simple question

Started by gotcha_ass, February 02, 2003, 07:49 PM

Previous topic - Next topic

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.

Grok

#1
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.

gotcha_ass

#2
Im sorry but you lost me. I havent done much programming w/ ClassModules.

Im not getting the first sentence, the rest I got.

Grok

#3
Why are you even using RaiseEvent if you don't know what it is for or how it is used?

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.

gotcha_ass

#5
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.