新聞中心
如何在vb.net里面動(dòng)態(tài)添加控件
Private WithEvents NewTextBox As TextBox
創(chuàng)新互聯(lián)建站主營(yíng)都安網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,app開發(fā)定制,都安h5微信小程序搭建,都安網(wǎng)站營(yíng)銷推廣歡迎都安等地區(qū)企業(yè)咨詢
'通過使用WithEvents關(guān)鍵字聲明一個(gè)對(duì)象變量為新的命令按鈕
Private Sub Command1_Click()
If NewTextBox Is Nothing Then
Set NewTextBox = Controls.Add("VB.TextBox", "cmdNew", Form1)
NewTextBox.Move 200, 200
NewTextBox.Width = Form1.Width - 450
NewTextBox.Height = Form1.Height - 1400
NewTextBox.Visible = True
End If
End Sub
Private Sub Command2_Click()
If NewTextBox Is Nothing Then
Exit Sub
Else
Controls.Remove NewTextBox
Set NewTextBox = Nothing
End If
End Sub
VB.NET中怎么加載第三方控件
點(diǎn)擊菜單:項(xiàng)目=》添加引用 彈出窗口后選擇“COM”項(xiàng),然后找到你要加載的控件。
記得先調(diào)用CMD使用 regsvr32 注冊(cè)你準(zhǔn)備加載的控件哈。
vb.net 窗體添加控件
Dim?Bt?as?New?Button
Bt.Size=New?Size(100,100)
Bt.Location=New?Point(100,100)
Bt.Text="New?Button"
Me.Controls.Add(Bt)
VB.net怎樣加第三方控件
工具箱右鍵單擊——選擇項(xiàng)……——選擇.net組件或com組件——點(diǎn)擊“瀏覽”選擇控件dll文件,然后工具箱中就會(huì)出現(xiàn)新加的控件
vb.net 怎么添加Windows Media Player控件? 注意是VB.NET不是VB
“工具箱”中單擊右鍵,選擇“選擇項(xiàng)”菜單,打開“選擇工具箱項(xiàng)”窗口,選擇“
COM組件
”標(biāo)簽,在列表中找到并勾選“Windows
Media
Player”組件,單擊“確定”按鈕。將該組件添加到指定的工具箱
選項(xiàng)卡
中,然后在工具箱里面找
Windows
Media
Player
控件,拉到form里面,拉出來的控件就是AxWindowsMediaPlayer
分享文章:vb.net添加控件 vbnet添加控件
文章位置:http://fisionsoft.com.cn/article/hphdce.html