delegates invoke

  • Thread starter Thread starter Rohan
  • Start date Start date
Am 11.08.2010 21:31, schrieb Rohan:




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)
 
Am 11.08.2010 23:36, schrieb Rohan:
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).
 
Am 11.08.2010 23:36, schrieb Rohan:





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).

Well, i am using VB,net 2010 and the code is as IS, i did not change
it what so ever,
can it be because of vb.net 2010 ???
 
Am 12.08.2010 14:05, schrieb Rohan:
Well, i am using VB,net 2010 and the code is as IS, i did not change
it what so ever,
can it be because of vb.net 2010 ???

I don't think so.

First I thought it's because of the trackbar's scroll event that
could occur before form_load, that means before the Sub has been called,
but no matter how I set it's Value property in the designer, the scroll
event does not occur at that point in time.

I've tried it now in VB 2010 and suddenly got the exception. It wasn't
obvious: The "Handles MyBase.Load" was missing! I don't know why. Maybe
because of errors when opening the designer. After adding it back, it
worked again. Have a look there, too. (I didn't try to reproduce again in
VB 2008)
 
Am 12.08.2010 14:05, schrieb Rohan:


I don't think so.

First I thought it's because of the trackbar's scroll event that
could occur before form_load, that means before the Sub has been called,
but no matter how I set it's Value property in the designer, the scroll
event does not occur at that point in time.

I've tried it now in VB 2010 and suddenly got the exception. It wasn't
obvious: The "Handles MyBase.Load" was missing! I don't know why. Maybe
because of errors when opening the designer. After adding it back, it
worked again. Have a look there, too. (I didn't try to reproduce again in
VB 2008)

Armin i am not to familiar with the Handles MyBase.Load, where would i
added it ?
thank you
 
Am 12.08.2010 18:45, schrieb Rohan:
Armin i am not to familiar with the Handles MyBase.Load, where would i
added it ?

Look on the page where you have the code from. It's in the "Sub Form_Load"
line.
 
Back
Top