怎样用代码添加一个windows控件?

haitao5676 2005-02-22 11:49:40
我想用一个按钮来控制增加一个windows控件!
比如:
点击按钮后,自动添加一个下拉列表或标签
...全文
64 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
haitao5676 2005-02-22
  • 打赏
  • 举报
回复
谢谢!
我不懂电脑 2005-02-22
  • 打赏
  • 举报
回复
button3 = new System.Windows.Forms.Button();
button3.Location = new System.Drawing.Point(76, 104);
button3.Visible = true;
button3.Name = "button2";
button3.TabIndex = 2;
button3.Text = "button2";
button3.Click += new System.EventHandler(this.button1_Click);

this.Controls.Add(this.button3);
yizhixiaozhu 2005-02-22
  • 打赏
  • 举报
回复
up
hamadou 2005-02-22
  • 打赏
  • 举报
回复
操作失误:呵呵
dim txt as new system.windows.form.textbox()
txt.location=new system.drawing.point(50,50)
txt.size=new system.drawing.size(80,20)
txt.name="aa"
txt.text="11"
me.controls.add(txt)
hamadou 2005-02-22
  • 打赏
  • 举报
回复
dim txt as new system.windows.form.textbox()
txt.location=new system.drawing.point(50,50)
txt.size=new system.drawing.size(80,20)

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧