Hi,
Please help me with the font changing. In my program i have to make the font and collor of a text to change.
I have a main form frmMain, and i have a label there lblText, i have menu commands: Edit and Font,Color.
When i press Font menu command i should be able to choose different fonts (timesnewroman etc.)
What i did is i created another form, which has a label "Enter the Font" and a list box with TimesNewRoman, Arial and etc, and cmdOK.When i click on menu command "font"
on the main form this form appears and allows to choose a font from a list, after it should disappear.
Here is my code:
Private cmdOK_Click()
If lbxFont.ListIndex = "Arial" Then _ frmMain.lblText.FontName = Arial
Unload frmFont
EndSub
It says variable is not defined and Highlights Arial.
Maybe u can suggest something or there are some other ways
Thanks.
Please help me with the font changing. In my program i have to make the font and collor of a text to change.
I have a main form frmMain, and i have a label there lblText, i have menu commands: Edit and Font,Color.
When i press Font menu command i should be able to choose different fonts (timesnewroman etc.)
What i did is i created another form, which has a label "Enter the Font" and a list box with TimesNewRoman, Arial and etc, and cmdOK.When i click on menu command "font"
on the main form this form appears and allows to choose a font from a list, after it should disappear.
Here is my code:
Private cmdOK_Click()
If lbxFont.ListIndex = "Arial" Then _ frmMain.lblText.FontName = Arial
Unload frmFont
EndSub
It says variable is not defined and Highlights Arial.
Maybe u can suggest something or there are some other ways
Thanks.