VS 2008 Express Edition中最奇怪的事情 [英] The oddest thing in VS 2008 Express Edition

查看:90
本文介绍了VS 2008 Express Edition中最奇怪的事情的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常使用一个表单和一些组合框来创建一个简单的winform应用程序.我已经完成了数百次相同的应用程序,但是昨天我看到了一件最奇怪的事情,我认为这肯定是VS 2008 Express Edition IDE中的错误.那是我无法访问窗体类区域中的所有方法中的任何组合框(我已添加到窗体中).似乎该表单上没有任何组合框".但是它可以与我意识到奇怪的事情之前编写的一些代码一起运行.特别是,我之前编写的代码无法直接通过名称来访问任何comboboxes属性,而可以通过某种处理它们某些事件的发送者"来间接访问它们.是的,它运作良好,但是如我所说,当我想使用对组合框的属性之一的访问来添加一些代码时,我做不到.我以为鬼可以做到"不是我自己,也不是科学的东西.噢,天哪,我简直不敢相信.经过一会儿的思考,我尝试将新的组合框添加到表单,发现它通常被视为表单的成员,但是旧的组合框仍被隐藏"(Ghost仍在执行)! > 您能和我分享一下如何发生的任何建议吗?我的故事太简单了,不需要在这里发布任何代码.而且我认为这种情况很少发生!

I created a simple winform app normally with a form and some comboboxes on it. I have done the same apps for hundreds of times but yesterday, I saw one of the oddest thing and I think that''s surely an error in VS 2008 Express Edition IDE. That was I couldn''t access any comboboxes (that I had added to the form) in all methods in the region of the form''s class. It seemed that "the form didn''t have any comboboxes on it". But it could run with some codes I had written before I realized the odd thing. Especially, the codes I had written before didn''t have any access to any comboboxes'' properties directly by their name but indirectly by the "sender" in some method handling some event of them. Yeah, it worked well, but when I wanted to add some codes using some access to one of properties of the comboboxes, as I said, I couldn''t. I thought "Ghosts do it" not myself or anything scientific. Oh my God, I couldn''t believe it. After a moment of thinking, I tried adding a new combobox to the form, and I saw it was normally seen as a member of the form, but the old comboboxes were still "hidden" (Ghosts were still doing it)!
Could you please share with me any suggestion on how it can happen? My story is too simple with no need to post any code here. And I think that can rarely happen!

推荐答案

不足为奇.有时视觉表单设计者会感到困惑.修改designer.cs文件时,通常会观察到这种情况.或者,如果您在表单构造函数中添加代码.升级到2010可能无法解决您的问题.
Not surprising. There are times when the visual forms designer gets confused. This is more commonly observed when you modify the designer.cs files. Or if you add code in your form constructor. Upgrading to 2010 may not solve your probem.


尝试使用新的VS 2010 Express.
Visual Studio 2010 Express [ ^ ]
Try the new VS 2010 Express.
Visual Studio 2010 Express[^]


这篇关于VS 2008 Express Edition中最奇怪的事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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