Same Property on the Seprate objects

Kashif
03-07-2003, 06:03 AM
I have more then Forms in a Projects
Every form aproximatly uses same Obejects Like Text Box, lable, Button,Frame, etc. I want to set a Standard of all the Objects like Font Size, Font Stype, Object Hight etc, on One Place
If there is any change in Font or hieght it should be Change on one Place and all the Obejects will be change automatically.

i think u will understand my Question
Is i have to Create any Object Libarary or there is Any othere mthod to do that

Any Help with Code will be appriciated.

Flyguy
03-07-2003, 06:55 AM
Before adding controls to a new form, first set the correct font style of the form. Controls added to the form will now inherit the form fontstyle.

Kashif
03-07-2003, 10:47 PM
i'm putting my Question again

for exapmple,
I have 5 Form, Each Form have 3 Text Boxes. I want to Set its Font Style In one time, and Later On if i want to Change a Its Font Property again. I'll change its font Style on One place and there would be Change automatically in all The Forms

I think Now this quetion will be Cleared to U

Flyguy
03-08-2003, 02:27 AM
Ok, use the FORMS collection to get all forms, use the CONTROLS collection of each FORM to get all controls.
You can base you code on something like this:

Dim F As Form
Dim C As Control

For Each F In Forms
For Each C In F.Controls
Set C.Font.Name = "Tahoma"
Next C
Next F

Kashif
03-08-2003, 03:00 AM
This code is Giving the error OBJECT required

Kashif
03-08-2003, 03:06 AM
Is there any othere way Like Creating any Libarary, Or DLL, Or some other method for formating the Controls on the Forms

Flyguy
03-08-2003, 07:08 AM
This code is Giving the error OBJECT required
I just typed in straight into the forum.
It wasn't meant to be copy & paste, but to point you in the right direction.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum