Visual Studio表单设计器 [英] Visual Studio Form Designer

查看:251
本文介绍了Visual Studio表单设计器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我使用Visual Studio表单设计器创建一个完美的OK表单时,为什么它似乎总是因为没有明显的原因而惹恼我?例如,当我右键单击代码并选择View Designer时,会出现一堆Designer
错误。


我有一个说:


变量'ProductGroupsLookup'未声明或从未分配过。


所以我转到代码并说明:


Me 。GroupBoxPubType.Controls.Add( .ProductGroupsLookup)



所以我走到设计师代码的脚下,发现:


朋友
带事件 ProductGroupsLookup
作为
Sage。 MMS.Controls.ProductGroupsLookup



在设计师代码的初始化部分我找到:



Me 。ProductGroupsLookup =
新建
Sage。 MMS.Controls.ProductGroupsLookup()



这都是由Visual Studio生成的,为什么它会一直出错?


Mike



解决方案

Hi Victorm93,


欢迎来到MSDN论坛。


这个问题是出现在你所有的Windows表单解决方案中还是仅仅是这个特定的解决方案?


请尝试创建一个新的Windows窗体项目,看看这个问题是否仍然存在。


请参阅错误消息,请右键单击解决方案名称并清理解决方案,重建解决方案以测试或关闭VS并重新打开解决方案。



最好的问候,


萨拉


When I have a perfectly OK form that I created using Visual Studio form designer why does it always seem to go screwy on me for no apparent reason? For example, when I right-click in the code and select View Designer is comes up with a bunch of Designer errors.

I have one that says:

The variable 'ProductGroupsLookup' is either undeclared or was never assigned.

So I go to the code and the line says:

Me.GroupBoxPubType.Controls.Add(Me.ProductGroupsLookup)

So I go to the foot of the designer code and I find:

Friend With EventsProductGroupsLookup As Sage.MMS.Controls.ProductGroupsLookup

and in the initialisation section of the designer code I find:

Me.ProductGroupsLookup = New Sage.MMS.Controls.ProductGroupsLookup()

This is all generated by Visual Studio so why does it keep erroring?

Mike

解决方案

Hi Victorm93,

Welcome to the MSDN forum.

Does this issue happen to all your windows forms solutions or just this specific solution?

Please try to create a new windows forms project and see if this issue persists or not.

Refer to the error message, please right click the solution name and Clean the solution, rebuild solution to test or close VS and reopen the solution.

Best regards,

Sara


这篇关于Visual Studio表单设计器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆