Solved

Forms in VB5 Dlls

Posted on 1997-06-01
1
131 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
A macro to Count the number of rows across all worksheets 3 93
message box in access 4 46
How to read File Date Created using VB6 8 38
Send outlook email from VBS Script 2 28
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

813 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