好像大約如此,太久了忘惹...
ClassUse compiler 成dll 並且完成註冊程序
standard exe:
Public Function Class_Initialize(AA As Integer, QQ As Double) As Long
A = AA
Q = QQ
A = Q ;或 Q = A 依需求
End Function
※ 引述《gecer (gecer)》之銘言:
: 如題
: 小弟編寫一個activeX 裡面帶一個class
: Name "ClassUse"
: =================================================================
: Option Explicit
: Public A As Integer
: Public Q As Double
: Private Sub Class_Initialize()
: A = 0
: Q = 0
: End Sub
: Public Function AQ_Set(AA As Integer, QQ As Double) As Long
: A = AA
: Q = QQ
: End Function
: ===============================================================
: 然後另外寫兩個standard exe (main1 ,main2) 去reference 這一個activeX
: 小弟想要 main1 讓 ClassUse.A=3 後 main2的ClassUse.A讀到也會是3
: 請問這可以做到嗎? 小弟查 MSDN class instancing property
: https://msdn.microsoft.com/en-us/library/aa234184%28v=vs.60%29.aspx
: 請問選擇某個property 後 可以達到兩程序互相溝通的功能嗎?