以Button为例
方法1:建立数组按钮
首先一个按钮叫Button1,index=0
在程序中要加载新按钮:load Button1(1)
卸载按钮:unload Button1(1)
但不能卸载Button1(0)方法2:在设计时什么按钮都不先建立
'声明对象变量 CommandButton
Private WithEvents cmdObject As CommandButton
Set cmdObject = Form1.Controls.Add("VB.CommandButton", "Button1")
Set cmdObject.Container = Form1
cmdObject.Visible = True
cmdObject.Caption = "按钮1"
方法1:建立数组按钮
首先一个按钮叫Button1,index=0
在程序中要加载新按钮:load Button1(1)
卸载按钮:unload Button1(1)
但不能卸载Button1(0)方法2:在设计时什么按钮都不先建立
'声明对象变量 CommandButton
Private WithEvents cmdObject As CommandButton
Set cmdObject = Form1.Controls.Add("VB.CommandButton", "Button1")
Set cmdObject.Container = Form1
cmdObject.Visible = True
cmdObject.Caption = "按钮1"
解决方案 »
- VB6用ADO连接ACCESS数据库后,在有些机器上好用有些机器上不好用,是什么原因??
- 知道父窗口句柄和当前窗口类名,如何获取当前窗口句柄?
- 请问一下 MSFlexGrid 怎么控制每行显示的
- 如何从SQL中导出数据到本地ACCESS
- 救救我吧?窗体.PrintForm后,有一个第三方的控件怎么也打不出来,打出来是黑的
- 关于随即字符数字
- 如何顺序实现:A打开B,A关闭,B中进行文件复制后,B启动A?
- 请问:在VB中如何方便的将access数据库中一个表的数据拷贝到另一个表中?
- 请问我的VB连接SQL中数据库代码哪里不对?谢谢!
- 哪有免费的压缩控件下载?
- 求助(400分+100至300元现金)
- 为什么来到CSDN,好像没有见到几个人很认真的解决问题,却只见到大家都在抢分?
想不到yefm也没睡!