Link to home
Start Free TrialLog in
Avatar of bdbrown
bdbrownFlag for Canada

asked on

UserControl - Property Set vursus Property Let?

I am trying to create a OCX and am having trouble with setting the Properties. Can someone explain (with workong examples) the differences between using 'Property Set' and 'Property Let' ?

bdb
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bdbrown

ASKER

Thanks Jim for the clarification,
So how would I go about setting the background of my control to a different colour at design time and have it stay that colour when I run the app? Would that be a Object or non-Object property?
BackColor by itself is often a Long Integer, so that would be Property Let.

Some controls actually have a .Font object property which contains font, size, bold/italic/etc, which would be Property Get.

What control are you using?
Avatar of bdbrown

ASKER

I am creating my own OCX control and want to make avalible some of these format and display properties at design time. When I open the form which the contol is placed, the values that I set at design time reset back to the default settings again. How can I assign default values and still allow the user to set properties at design?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bdbrown

ASKER

Dan; I am going to have to take some time to figure out this properties bag thing but I am sure the answer is in there.

Thanks for the help Jim and Dan - I have increased the points and will split between both of you.

bdb