我最近将我的项目从 VB6 转换为 VB.NET2008,在这里转换后是一个从我创建的模块控制表单的子,错误类似于
“cmdAdd 不是 System.Windows.Forms.Form 的成员”
Public Sub ButtonSet(ByRef frmObj As System.Windows.Forms.Form)
frmObj.cmdAdd.Visible = True
frmObj.cmdCopy.Visible = True
frmObj.cmdEdit.Visible = True
frmObj.cmdCorrection.Visible = True
End Sub
它是如何调用的:
Private Sub frmAPNote_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
ButtonSet(Me)
End Sub