Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing default font for controls

Status
Not open for further replies.

zakman

Programmer
Aug 15, 2001
49
US
Is there a way to change the default font from "MS Sans Serif" to something else when creating controls for a form?

I don't mean changing the Font property after the control has been created.

Thanks!
 
You could create an Active-X control that has just one command button on it. Change the font of the button, and then use that control instead of the regular button. If you want your button to behave the same as other buttons in every other respect, consider using the Active-X wizard (available through the Addin Manager)...that way you won't have to write any code at all.
 
OK, when you are creating a new form in VB6, each control that you place on the form has a default font setting of "MS Sans Serif". Suppose that I want "Arial" to be the default. Right now, I place the control on the form, then change to "Arial" in the control's font property. I'm trying to find a way to keep from doing this all the time.

There must be a setting somewhere in VB that controls this, or maybe this is a suggestion for the next version of VB?

Thanks!
 
Simply change the font property of the form on which you are placing controls. All controls you place on that form from now on will inherit font name, size, and attributes.

Hope this helps
 
Hmmm, that helps quite a bit, however, we would still
like to be able to have new forms default to "arial"
instead of "ms sans serif". For now, we'll just change
the font on each form before creating controls.

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top