If e.Col.name="code" Then Syscmd.Project.CommandWindow() Dim frm As System.Windows.Forms.Form = System.Windows.Forms.Form.ActiveForm frm.text="代码编辑器" 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("code") End If Next Dim lbl As new System.Windows.Forms.button lbl.Text = "保存代码" lbl.name="保存代码" lbl.Location = New Point( frm.Controls("button3").left -80, frm.Controls("button3").Top) 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
|