?
Solved

Forms in VB5 Dlls

Posted on 1997-06-01
1
Medium Priority
?
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
dansari earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

718 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