每次我尝试用代码做一个按钮,它都不显示。怎么了?
Dim NewButton As New Windows.Forms.Button
如何在Visual Basic 2010中显示它?
发布于 2016-08-22 00:55:57
该按钮将不会显示,除非您将其添加到表单中。
试试这个:
Me.Controls.Add(NewButton)
Me
表示要在其中创建按钮的当前表单,您可以将其替换为要放置该按钮的表单名称。
https://stackoverflow.com/questions/39070122
复制