VBA 反对 delphi 声明
VBA object to delphi declaration
我有来自供应商网站的以下 VBA 代码。我设法将 TLB 库导入到 Delphi 项目中,并引用了相应的单元文件。但是,我正在努力将下面的 VBA 特定对象声明转换为 Delphi。我该怎么做?
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.ibmTerminal
Dim view As Attachmate_Reflection_Objects.view
Dim frame As Attachmate_Reflection_Objects.frame
Set app = GetObject("Reflection Workspace")
'Get handles to the frame, view, and terminal objects
Set frame = app.GetObject("Frame")
Set view = frame.SelectedView
Set terminal = view.Control
生成的类型库的末尾通常是一个带有 Co 类 的部分。这些是您可以使用替换
Set app = GetObject("Reflection Workspace")
类似的东西:
MyDelphiComClass := CoReflection_Workspace.Create;
没看过,不过这里面好像有点知识:Building a COM Client Application
乍一看还算完整。
我有来自供应商网站的以下 VBA 代码。我设法将 TLB 库导入到 Delphi 项目中,并引用了相应的单元文件。但是,我正在努力将下面的 VBA 特定对象声明转换为 Delphi。我该怎么做?
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.ibmTerminal
Dim view As Attachmate_Reflection_Objects.view
Dim frame As Attachmate_Reflection_Objects.frame
Set app = GetObject("Reflection Workspace")
'Get handles to the frame, view, and terminal objects
Set frame = app.GetObject("Frame")
Set view = frame.SelectedView
Set terminal = view.Control
生成的类型库的末尾通常是一个带有 Co 类 的部分。这些是您可以使用替换
Set app = GetObject("Reflection Workspace")
类似的东西:
MyDelphiComClass := CoReflection_Workspace.Create;
没看过,不过这里面好像有点知识:Building a COM Client Application
乍一看还算完整。