public runtime access to properties 
Author Message
 public runtime access to properties

I am attempting to make my VB interface dynamic at run time (more or less so
it is controllable by a scripting language and so i don't need to recompile
for every new feature).  For example, I have created an ActiveX exe with a
class called Class1 with the following methods:

Public Function AddForm() As Variant
    Set AddForm = New Form1
End Function

Public Function AddMDIForm() As Variant
    Set AddMDIForm = New MDIForm1
End Function

I am able to create forms this way, and to a certain extent control them.
There are certain methods of forms, however, which I cannot control.  For
example if w is an instance of Class1, then

f1 = w.AddForm()

will add a form, and things like

f1.Visible = 1
f1.Caption = 'My New Caption'

work fine (in this case showing the form and changing the caption).  I can
also add an mdi form like

mdi = w.AddMDIForm

.  I cannot, however, get something like

f1.MDIChild = 1

to work.  So, what is the difference between one method an another?  is VB
simply blocking me from making a clone, or is there some substantive
difference?

Thanks for any insight,

doug



Wed, 06 Jul 2005 05:07:52 GMT  
 public runtime access to properties
Is not the MDIChild property read only at run time ?

It is in VB5



Quote:
>I am attempting to make my VB interface dynamic at run time (more or less so
>it is controllable by a scripting language and so i don't need to recompile
>for every new feature).  For example, I have created an ActiveX exe with a
>class called Class1 with the following methods:

>Public Function AddForm() As Variant
>    Set AddForm = New Form1
>End Function

>Public Function AddMDIForm() As Variant
>    Set AddMDIForm = New MDIForm1
>End Function

>I am able to create forms this way, and to a certain extent control them.
>There are certain methods of forms, however, which I cannot control.  For
>example if w is an instance of Class1, then

>f1 = w.AddForm()

>will add a form, and things like

>f1.Visible = 1
>f1.Caption = 'My New Caption'

>work fine (in this case showing the form and changing the caption).  I can
>also add an mdi form like

>mdi = w.AddMDIForm

>.  I cannot, however, get something like

>f1.MDIChild = 1

>to work.  So, what is the difference between one method an another?  is VB
>simply blocking me from making a clone, or is there some substantive
>difference?

>Thanks for any insight,

>doug



Wed, 06 Jul 2005 13:37:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOWTO: Restrict access to public properties (or at least its data)

2. Host for Property Pages or Public Property Page

3. Host for Property Pages or Public Property Page

4. Accessing a property by name at runtime

5. Accessing properties at runtime

6. Accessing properties at runtime

7. Runtime access to control properties?

8. Accessing owner of distribution lists and access rights of public folders in Access 97

9. Runtime Error 430 adding new Public event to dll

10. using VBscript to access Access database in public folder

11. Access 2000 runtime and Crystal Report 7 runtime

12. Access 2000 runtime and Crystal Report 7 runtime

 

 
Powered by phpBB® Forum Software