在Windows窗体上无法在运行时看到我的控件 [英] Can not see my controls at runtime on windows forms in

查看:76
本文介绍了在Windows窗体上无法在运行时看到我的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

项目正在开发中:visual studio 2008使用c#。



有一个Windows窗体:14个按钮1个选项卡控件5个面板1个图片框


此级别应用程序的
已成功运行。最近我在表单中添加了3个按钮。仍然应用程序正在运行,但最近添加了3个按钮,并且最近的更改未在运行时显示。



(这些控件未设置为隐藏,并且出现在设计器代码和一个更多的事情,它发生在各种形式,并没有只显示我最近的更改,剩下的所有控件都工作正常。)



我希望有人会给出确切的答案。任何有经验的.net开发人员都可能遇到过这个问题。

Project is being developed in: visual studio 2008 using c#.

There is a Windows form with : 14 buttons 1 tab control 5 panels 1 picture box

at this level application was running successfully. recently i added 3 more buttons to the form. still the application is running but recently added 3buttons and recent changes are not showing at runtime.

(these controls are not set to hidden and are appearing in designer code and one more thing, it is happening with all forms and not showing my recent changes only, remaining all controls are working fine.)

I hope somebody will give exact answer. Any experienced .net developer might have experienced this problem.

推荐答案

我们无法给出确切的答案,因为我们无法确切地看到发生了什么 - 那里有很多可能的原因。
你需要检查几件事:

1)你的代码在最新的更改后是否干净利落地编译了?如果没有,则不会生成任何EXE文件,因此应用程序中不会显示任何更改。如果您使用多个项目,这包括解决方案中的所有项目。

2)编译时是否正在使用EXE文件(即它是否正在执行)?如果是这样,那么它就不能被覆盖,并且构建将失败。

3)你是否正在构建与测试相同的版本?即您的构建设置为Release并且您针对Debug版本进行测试(反之亦然)?



检查这些,如果这样做没有帮助尝试:

1)在Build菜单上,选择Clean solution

2)在Build菜单上,选择Rebuild solution

这应该摆脱中间文件并从头开始重建整个解决方案。



从那里开始看看会发生什么。
We can't give an exact answer, because we can't see exactly what is going on - there are a lot of possible reasons for this.
There are a couple of things you need to check:
1) Did your code compile cleanly after the latest changes? If it didn't then no EXE file will be produced, so no changes will show up in the application. This includes all projects in a solution if you use more than one.
2) Is the EXE file in use (i.e. is it being executed) when you compiled? If so, then it can't be overwritten and the build will fail.
3) Are you building the same version as you are testing? I.e. Is your build set to Release and you testing against the Debug version (or vice versa)?

Check those, and if that doesn't help try this:
1) On the Build menu, select "Clean solution"
2) On the Build menu, select "Rebuild solution"
This should get rid of intermediate files and rebuild your whole solution from scratch.

Start there and see what happens.


这篇关于在Windows窗体上无法在运行时看到我的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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