这些“让”做什么?并“得到”意思是?

发布于 2024-12-13 19:05:30 字数 655 浏览 0 评论 0原文

这是由 activeX 生成的一些文档,你能解释一下那些“let”和“get”是什么意思吗?

Public Property Get ReadyState() ' property ReadyState
Public Property Get TotalFrames() ' property TotalFrames
Public Property Get Playing() ' property Playing
Public Propety Let Playing() ' property Playing
Public Property Get Quality() ' property Quality
Public Propety Let Quality() ' property Quality
Public Property Get ScaleMode() ' property ScaleMode
Public Propety Let ScaleMode() ' property ScaleMode
Public Property Get AlignMode() ' property AlignMode
Public Propety Let AlignMode() ' property AlignMode

我是一名 Java 开发人员,我需要在我的 java gui 应用程序中嵌入一个 activex 控件

here is some documentation generated from activeX, can you explain me what do those "let" and "get" mean?

Public Property Get ReadyState() ' property ReadyState
Public Property Get TotalFrames() ' property TotalFrames
Public Property Get Playing() ' property Playing
Public Propety Let Playing() ' property Playing
Public Property Get Quality() ' property Quality
Public Propety Let Quality() ' property Quality
Public Property Get ScaleMode() ' property ScaleMode
Public Propety Let ScaleMode() ' property ScaleMode
Public Property Get AlignMode() ' property AlignMode
Public Propety Let AlignMode() ' property AlignMode

I am a Java developer, I need to embed a activex control in my java gui application

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来是傀儡 2024-12-20 19:05:30

事实上,它们对应于“getters”和“setters”。但是,语法看起来错误。我认为类型可能是Variant(它可能没有对应的Java类型),但在这种情况下,我希望Property Let代码是:

Public Property Let MyValue(ByVal value)
End Property

通常,您应该包含类型:

Public Property Let MyValue(ByVal value As Integer)
End Property

Public Property Get MyValue As Integer
End Property

我会回到给你这个废话VB的工具,看看你是否能得到更好的信息。或者,您需要一些可以读取 OCX 控件类型库的东西。如果您没有 Visual Basic,您将能够在 Word、Excel、Access 等中使用 VBA。

Indeed, these correspond to "getters" and "setters". However, the syntax looks wrong. I suppose that the type could be Variant (which would probably not have a corresponding type for Java), but in that case, I would expect the Property Let code to be:

Public Property Let MyValue(ByVal value)
End Property

Normally, you should include the type:

Public Property Let MyValue(ByVal value As Integer)
End Property

Public Property Get MyValue As Integer
End Property

I would go back to the tool which gave you this nonsense VB and see if you get better information. Alternatively, you need something which will allow you to read the type library of the OCX control. If you don't have Visual Basic, you will be able to use VBA in Word, Excel, Access etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文