JessieErin

Hi Everyone,

I'm upgrading a usercontrol from VB6 to VB2005. I didn't write the original code so I'm not entirely sure how it works (and this is my first usercontrol!). The usercontrol itself has no errors and I've added it successfully to a form in another project. However, when I try to run that project I get this error:

An error occurred creating the form. See Exception.InnerException for details.

The error is: Get not supported at runtime.

My first guess was that there was something wrong with the properties as they have "Get" statements in them. But they seem to be structured correctly. An example:

Public Property Belt_Width() As Single

Get

Belt_Width = m_Belt_Width

End Get

Set(ByVal Value As Single)

m_Belt_Width = Value

RaiseEvent Belt_WidthChange()

Call Calculate()

Call Calculate()

If Me.Auto_Calculate = True And Me.Redraw_Graphics = True Then g.Clear(Color.White)

Call Calculate()

End Set

End Property

There's lots of these.

What I'm hoping is that someone has a more specific reason for this error or an idea where I can look for the problem because right now I have no idea.

Thanks for the help!

Jess



Re: Windows Forms General error during runtime of usercontrol

Yu Guo ¨C MSFT

Hi, JessieErin,

It depends on what the m_Belt_Width is, and it seems that it is a ReadOnly value.

Could you please give more details

Hopes this helps,

Regards






Re: Windows Forms General error during runtime of usercontrol

JessieErin

Hi,

m_Belt_Width appears to just be a single. I don't see anywhere anything about being ReadOnly.

That doesn't provide you with much information but that's all I can see. Did you have specific things that you wanted to know (I'm a bit of a beginner)

~Jess





Re: Windows Forms General error during runtime of usercontrol

Yu Guo ¨C MSFT

Hi, JessinErin,

I am sorry that I made a mistake. As they got a "Get not supported at runtime", they are write-only instead of read-only.

You can try to comment the lines of "Get" segment to check if the error appears again.

And if possible, please post all the lines related to m_Belt_Width.

Hopes this helps,

Regards






Re: Windows Forms General error during runtime of usercontrol

nobugz

"Get not supported at runtime" is a VB6 error message, not a .NET exception. Sure sounds like you are still using the VB6 component instead of your replacement. Focus on the InnerException property of the exception to find out where the code bombed.





Re: Windows Forms General error during runtime of usercontrol

Yu Guo ¨C MSFT


We are changing the issue type to ¡°Comment¡± because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to ¡°Question¡± by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
Thank you!