以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 单元格里的代码格式 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=125726) |
-- 作者:bobolan521 -- 发布时间:2018/10/5 10:34:00 -- 单元格里的代码格式 Dim code As String Dim frm As System.Windows.Forms.Form = System.Windows.Forms.Form.ActiveForm Dim obj = frm.controls("SplitContainer1") If obj.name="SplitContainer1" Then Dim editor = obj.panel1.controls("MyCodeEditor21").Controls("SplitContainer1").Panel1.Controls("SplitContainer2").panel1.controls("Editor") \'msgbox(editor.text) \'MessageBox.Show(editor.text) CurrentTable.value = editor.text \'frm.close End If 请问一下老师,命令窗口的代码保存到了单元格,但是格式变了,代码该如何修改才能和命令窗口一样啊
|
-- 作者:有点甜 -- 发布时间:2018/10/5 10:45:00 -- Dim code As String Dim frm As System.Windows.Forms.Form = System.Windows.Forms.Form.ActiveForm Dim obj = frm.controls("SplitContainer1") If obj.name="SplitContainer1" Then Dim editor = obj.panel1.controls("MyCodeEditor21").Controls("SplitContainer1").Panel1.Controls("SplitContainer2").panel1.controls("Editor") CurrentTable.value = editor.text.replace(chr(10), vbcrlf) End If |
-- 作者:bobolan521 -- 发布时间:2018/10/5 10:47:00 -- 谢谢老师 |