princyrajan
asked on
About using font in vb6.0 data report
hello friends,
please see the coding below.
Dim fnt As New StdFont
Private Sub Command2_Click()
CommonDialog1.Flags = cdlCFBoth Or cdlCFEffects
CommonDialog1.ShowFont
fnt.Name = CommonDialog1.FontName
fnt.Size = CommonDialog1.FontSize
fnt.Bold = CommonDialog1.FontBold
fnt.Italic = CommonDialog1.FontItalic
fnt.Underline = CommonDialog1.FontUnderlin e
fnt.Strikethrough = CommonDialog1.FontStriketh ru
end sub
Private Sub Command1_Click()
Set DataReport1.Font = fnt
DataReport1.Show
End Sub
when i set the datareport.font to stdfont(fnt), it doesn't
make any change or effect in the data report. how to make it possible and also how to catch the selected color property from the font dialog box.help me.
please see the coding below.
Dim fnt As New StdFont
Private Sub Command2_Click()
CommonDialog1.Flags = cdlCFBoth Or cdlCFEffects
CommonDialog1.ShowFont
fnt.Name = CommonDialog1.FontName
fnt.Size = CommonDialog1.FontSize
fnt.Bold = CommonDialog1.FontBold
fnt.Italic = CommonDialog1.FontItalic
fnt.Underline = CommonDialog1.FontUnderlin
fnt.Strikethrough = CommonDialog1.FontStriketh
end sub
Private Sub Command1_Click()
Set DataReport1.Font = fnt
DataReport1.Show
End Sub
when i set the datareport.font to stdfont(fnt), it doesn't
make any change or effect in the data report. how to make it possible and also how to catch the selected color property from the font dialog box.help me.
ASKER
Thanks a lot Anthony!!!.
when i was doing this i met with another problem.
i want to make the "rptlabel" to be underlined and
i do this using the property window(font) of "rptlabel". Then i try to change the font of the report thru coding (as i given my coding earliar),but the "rpttext" alone changes and "rptlabel" remains unchanged(but it was underlined). how to rectify this problem . how to get the control of "rptlabel" in the coding .please help me.
Thank u.
Thilak
when i was doing this i met with another problem.
i want to make the "rptlabel" to be underlined and
i do this using the property window(font) of "rptlabel". Then i try to change the font of the report thru coding (as i given my coding earliar),but the "rpttext" alone changes and "rptlabel" remains unchanged(but it was underlined). how to rectify this problem . how to get the control of "rptlabel" in the coding .please help me.
Thank u.
Thilak
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for ur response. if u get any idea, post me.
with regards,
thilak.
with regards,
thilak.
Set DataReport1.Font = fnt
DataReport1.Refresh '<--- Add this
DataReport1.Show
Anthony