.net - NullReferenceException with ToolTip.CreateHandle -


When we try to update a tool tip, we can easily get errors

< Pre> ToolTip .etToolTip (myLabel, customDataStructure)

The error we get is a NullReferenceException: Object reference is not set to an object instance

Does anyone know the reason for this?

Is a simple try / hold which is NullReferenceException a viable option? We do not want that we blow our entire application.

I think that you are calling 'codeTool.TipToolTip' from an event handler and that handler Sometimes a fire occurs before creating a label. You should probably protect it with an inquiry for label null , and then make sure that the tip of the device is started on the label's load event.

You definitely should not catch this exception because this hides the problem.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -