如何通过代码以vb.net形式添加控件并在设计时查看? [英] How to add controls in vb.net form by code and view in design time ?

查看:146
本文介绍了如何通过代码以vb.net形式添加控件并在设计时查看?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...
我将开发一个代码生成器来创建带有多个控件(例如,文本框,按钮等)的表单.

现在我的问题是

1.我在form1.vb文件中添加了控件,但是我在设计时看不到,只能在运行时看到.

2.我还试图通过在form1.designer.vb文件中编写代码来添加控件
但我仍然看不到表格上的控件

我应该怎么做?

Hi...
I am going to develop a code generator to create form with several control like textbox,Button ect.

Now my problem is

1. I am adding the control in form1.vb file , But I am unbale to see at design time,I can see only in run time.

2.I also tried to add controls by writing the code in form1.designer.vb file
but I still unable to see the controls on form

what should I do ?

推荐答案

在Visual Studio 2010中,有一个选项开关,可以检测源代码是否已在IDE外部进行编辑并自动重新加载文件;检查设置是否打开.

Visual Studio自动加载 [
In Visual Studio 2010 there is an options switch that can detect if the source has been edited outside of the IDE and reload the file automatically; Check the setting is on.

Visual Studio Autoload[^]


您能告诉我您正在执行项目的版本吗?
这样我就可以理解您的问题了.
can you tell me your version on which you are doing your project ?
then i can understand your problem..


这篇关于如何通过代码以vb.net形式添加控件并在设计时查看?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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