Foxtable(狐表)用户栏目专家坐堂 → 简单改造编辑器


  共有2305人关注过本帖树形打印复制链接

主题:简单改造编辑器

帅哥哟,离线,有人找我吗?
2900819580
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1312 积分:9533 威望:0 精华:0 注册:2015/6/30 8:46:00
简单改造编辑器  发帖心情 Post By:2020/2/24 17:21:00 [只看该作者]

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编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107133 积分:544908 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/2/24 17:25:00 [只看该作者]

这个方法现在已经不适用。官方也不支持这种用法。

 回到顶部