Foxtable(狐表)用户栏目专家坐堂 → 代码执行问题


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

主题:代码执行问题

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


加好友 发短信
等级:童狐 帖子:210 积分:1790 威望:0 精华:0 注册:2017/6/28 16:46:00
代码执行问题  发帖心情 Post By:2019/6/26 10:50:00 [只看该作者]

If e.Col.name="代码" Then
    ''代码输入
    Syscmd.Project.CommandWindow()
    Dim frm As System.Windows.Forms.Form = System.Windows.Forms.Form.ActiveForm
    frm.text="代码编辑器:" '& args(0).ChangedItem.Label
    For Each c As  System.Windows.Forms.Control In frm.Controls
        If c.name="SplitContainer1" Then
            c.controls.Item(0).controls.Item(0).controls.Item(0).controls.Item(0).controls.Item(0).controls.Item(0).controls.Item(0).text=e.Row("代码")
        End If
    Next
    
    Dim x As Integer
    Dim y As Integer
    For Each c As  System.Windows.Forms.Control In frm.Controls
        If c.name="button3" Then
            x=c.left
            y=c.Top
        End If
    Next
    Dim lbl As new System.Windows.Forms.button
    lbl.Text = "保存代码"
    lbl.name="保存代码"
    lbl.Location = New Point(x-80, y)
    lbl.Anchor = System.Windows.Forms.AnchorStyles.bottom Or System.Windows.Forms.AnchorStyles.right  '面板锚定
    If frm.Controls.Contains(lbl) = False Then
        frm.Controls.Add(lbl)
        AddHandler frm.Controls("保存代码").Click, AddressOf SaveCode_Click
    End If
    e.Cancel=True
End If
图片点击可在新窗口打开查看此主题相关图片如下:存.jpg
图片点击可在新窗口打开查看

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/6/26 12:03:00 [只看该作者]

请在全局代码定义 SaveCode_Click

 

http://www.foxtable.com/webhelp/topics/1938.htm

 


 回到顶部