且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

c#.net 2005中的窗体上未显示控件

更新时间:2023-12-06 16:45:58

还有两件事需要检查:
1.如果它们是自定义控件,则可能需要自己处理它们的绘制.
2.如果它们继承了其他UserControl,则您可能已重写OnPaint()而不被称为基本函数.
3.也许这些控件位于另一个控件的后面:请尝试在控件上使用BringToFront()来查看在运行应用程序时是否出现.
Here are a couple more things to check out:
1. If they are custom controls, you may need to handle the painting of them yourself.
2. If they inherit other UserControls, you may have overridden the OnPaint() and not called the base function.
3. Maybe the controls are behind another control: try using BringToFront() on the controls to see if any appear when you run the app.


它们是否位于不可见的容器中( Visible设置为false)?搜索可见",查看是否在代码中的任何地方将其清除.
Could they be in a container which is invisible (Visible set to false)? Do a search for "visible", see if it is cleared anywhere in the code.


如果indivara所说的内容不起作用,请转到设计器代码,并搜索location属性控制.尝试将其设置为Point(0,0).如果现在可以看到您的控件,则意味着您的控件已放置在窗体边界之外.尝试修复它们.

一切顺利.
If what indivara said doesn''t work then go to the designer code, and search for location property of the control. Try to set it to Point(0, 0). If you can see your control now, then it means your controls are placed out of the form boundary. Try to fix them.

All the best.