Schmidt
6/24/2011 11:31:00 AM
Am 24.06.2011 12:40, schrieb MM:
> I'm using an NNTP control that has an IsReadable property that is set
> to True when data is waiting.
>
> Instead of polling in a loop for IsReadable = True I wondered if I
> could somehow set up an event handler that triggers when the property
> goes from False to True.
>
> Trouble is, I'm a novice when it comes to roll-your-own event handlers
> and all the explanations I've found on the web are as clear as mud.
In case you have the source of the Control in question,
then you will have to look, using a Control-CodeModule-wide
search, for all occurences, where the internal m_IsReadable,
or mIsReadable (whatever) Boolean-Variable is changed in the
NNTP-source-code (e.g. by searching for the string:
'm_IsReadable ='
If you're lucky, you will find only one place,
where the Value of this internal Prop-Variable
is set/changed - and that's the place where you
(after the line with m_IsReadable =)
would need to place a:
RaiseEvent ReadableStateChanged()
Then you will only have to add an additional line
at the top of the COntrol-CodeModule:
Public Event ReadableStateChanged()
and you're done.
Olaf