VB form designers errors on custom control

Asked By 190 points N/A Posted on -
qa-featured

Hi TechyV buddies!

I am having some problems with the custom list box control to display my event. I have a class that holds all the information about any event. However, in oreder to keep me updated I crated this custom list box. This enables me to see the list of events that I have to prioritize. However, I came across with the problem after adding it to a VB form to build a project. The problem was, an error message which states:

“the form editor errors – and will no longer display or allow changes to the forms design.”

This error seems to express that the designers are trying to make a value of the property by creating a resource in the forms resource file(.resx). However this was unsuccessful because the data type is nulled. This means that it cannot be converted to a valid type.

I have tried to solve it by looking into the web for any answer but it is really hard for me to find any. Can my class do anything to this problem? What should I do to keep from trying to set the default value of the property? Are there any other alternative to this? Can you help me solve this problem please?

Thank you!

SHARE
Answered By 10 points N/A #147137

VB form designers errors on custom control

qa-featured

Hello Joey,

It is most likely that the error that you are getting is due to a bug in the forms designer when it attempts to store a default value for the property in the forms resource file, and the data type happens to be a bit complicated. Due to that, it ends up placing in a null value that it cannot be able to convert back to the correct data type.

To resolve that issue, you will need to try modifying the custom control. You will need to split the EventList property into 2 overloaded routines. One EventList Sub  will be the one that takes the List(Of cEvent) as a parameter, and the other  EventList Function will be the one that Returns a List(Of cEvent).

Hope this helps.

Regards,

Carl

 

Related Questions