VB中代码如下
Dim doc As Object
Dim selection As Object
Dim tr As Object
' This routine inserts a button at the current selection
' Get the DHTML Document object
Set doc = DHTMLEdit1.DOM
' Get the DHTML Selection object
Set selection = doc.selection
' Create a TextRange on the current selection
Set tr = selection.createrange
tr.pasteHTML ("<BUTTON TITLE=Button>Button!</BUTTON>")在C#中改成如下却不能运行,提示D:\工作文件夹\校园精品课程合成器项目\Project1\Project1\Project1\WinUI\MainForm.cs(1954): “object”并不包含对“pasteHTML”的定义 object zero=this.axDHTMLEdit1.DOM.selection.createRange(); zero.pasteHTML ("<BUTTON TITLE=Button>Button!</BUTTON>");
Dim doc As Object
Dim selection As Object
Dim tr As Object
' This routine inserts a button at the current selection
' Get the DHTML Document object
Set doc = DHTMLEdit1.DOM
' Get the DHTML Selection object
Set selection = doc.selection
' Create a TextRange on the current selection
Set tr = selection.createrange
tr.pasteHTML ("<BUTTON TITLE=Button>Button!</BUTTON>")在C#中改成如下却不能运行,提示D:\工作文件夹\校园精品课程合成器项目\Project1\Project1\Project1\WinUI\MainForm.cs(1954): “object”并不包含对“pasteHTML”的定义 object zero=this.axDHTMLEdit1.DOM.selection.createRange(); zero.pasteHTML ("<BUTTON TITLE=Button>Button!</BUTTON>");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货