Solved

Forms in VB5 Dlls

Posted on 1997-06-01
1
130 Views
Last Modified: 2006-11-17
I 've created a form(form1) and placed it in an ActiveX dll project.

in Class1 I've delcared the form as a property of the class:
private F as form1

in Class1_Initialize I create the instance..

set F = new form1

Now the question is, when the user interacts with the form, how can write changes the user made on the form back to the other properties of Class1. (for examble a button on the form changes the value of Class1.SomeProperty

Dave  
0
Comment
Question by:Hitman
1 Comment
 
LVL 3

Accepted Solution

by:
dansari earned 100 total points
ID: 1426675
In form1, declare a variable of type Class1 (say it's moClass), and make a property Set procedure in form1 something like this:

Property Set Class (oClass as Class1)
   Set moClass = oClass
End Property

In Class1_Initialize, after your 'Set F' statement, put in another statement:

Set F.Class = me

Then, whenever anything in form1 changes, you can access and set variables or properties of moClass.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now