http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=26226&skin=0
跟着以上的实例,并修改了相关的一些代码,介理界面还是没有显示 BtnNotepadEdit 按钮,还出现以下错误!
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.1.19.19
错误所在事件:计划计划1
详细错误信息:
未将对象引用设置到对象的实例。
做个以下调试
Dim BtnFind As system.Windows.Forms.Button = frmCodeEditor.Controls("Button4")
MessageBox.Show(btnfind.left)
MessageBox窗体没有任何弹出,错误如上蓝色字提示!
整个项目只有以下代码
Dim frmCodeEditor As system.Windows.Forms.Form = system.Windows.Forms.Form.ActiveForm
If frmCodeEditor Is Nothing Then Return
If frmCodeEditor.Name = "Class197" OrElse frmCodeEditor.name = "Class260" Then Return
If frmCodeEditor.Controls("BtnNotepadEdit") IsNot Nothing Then Return
Dim BtnFind As system.Windows.Forms.Button = frmCodeEditor.Controls("Button4")
Dim BtnNotepadEdit As New system.Windows.Forms.Button
With BtnNotepadEdit
.Name = "BtnNotepadEdit"
.Anchor = system.windows.Forms.AnchorStyles.Left Or system.windows.Forms.AnchorStyles.Bottom
.Top = BtnFind.Top
.Left = 96
.Size = BtnFind.Size
.Text = "NotePad++"
End With
frmCodeEditor.Controls.Add(BtnNotepadEdit)
[此贴子已经被作者于2020/2/24 17:21:29编辑过]