在PowerBuilder中.NET互操作程序

编程入门 行业动态 更新时间:2024-10-25 19:29:28
本文介绍了在PowerBuilder中.NET互操作程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在寻找一个方式做一个PB对象和.NET(C#)客体之间的双向通信。在看着他的GUI 控制的布拉德的.NET版本,我看怎么给.NET对象的PB 对象的引用。但在这个例子中,它转换为成PowerObject(基本上)。 ,C#语言的代码只有PB对象上调用triggerEvent时()。

I'm looking for a way to do two-way communication between a PB object and a .NET (C#) object. In looking at Brad's .NET version of his GUI controls, I see how to give the .NET object a reference to the PB object. But in that example, it's cast as a PowerObject (basically). That C# code only calls TriggerEvent() on the PB object.

我要建立在C#中称为foo1的自定义类。我想创建一个foo1 法BAR1称为()。

I want to create a custom class in C# called foo1. I want to create a method on foo1 called bar1().

我想创建一个PB自定义类名为foo2的。我想创建一个foo2的方法调用BAR2()。

I want to create a custom class in PB called foo2. I want to create a method on foo2 called bar2().

我希望能够foo2的中创建foo1的一个实例。我想能够从foo2的中调用foo1.bar1()。

I want to be able to create an instance of foo1 within foo2. I want to be able to call foo1.bar1() from within foo2.

(我很好,直到在这里。)

(I'm good up until here.)

我希望能够从foo1中引用foo2的。我希望能够从foo1中调用foo2.bar2()。

I want to be able to reference foo2 from within foo1. I want to be able to call foo2.bar2() from within foo1.

推荐答案

我肯定有更eligent方式做到这一点,但使用COM可能是最容易的。

I am sure there is a more eligent way to do this, but using COM might be the easiest.

  • 的在PowerBuilder中使用COM
  • 使用.NET
  • Using COM in PowerBuilder
  • Using COM in .NET

有人会说,COM是永远正确的答案,但我说使用合适的工作的正确工具。

Some people would say that COM is never the right answer, but I say use the right tool for the right job.

更多推荐

在PowerBuilder中.NET互操作程序

本文发布于:2023-10-31 01:48:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544632.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:操作   程序   PowerBuilder   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!