.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
Post a Comment