Am 11.08.2010 23:36, schrieb Rohan:
>>
>>> I am trying to do this example :http://sherlockholmes_cases.tripod.c..._Delegates.htm
>>> i keep getting Object reference not set to an instance of an object.
>>> when i call a m_dlgCEH.Invoke
>>
>>> Anyone could help me ?
>>
>> You didn't call Sub SetDlgRef
>
> Armin, even if i call the Sub SetDlgRef it does not solve my problem,
> i still need to initialize the m_dlgCEH delegate, (which i don't know
> how to do)
With the full code from the linked page, I can not reproduce the
problem. That's why I thought you are using the Printer class
but different code to test it. Do you?
If the exception occurs, look at the callstack to see where the InkLevel
property is accessed. That's probably before you call Sub SetDlgRef.
How do you call the Sub (if it's not the code from the page)?
BTW, I can compile it only by switching off some compiler checks
(Option Strict Off).
--
Armin