Link to home
Start Free TrialLog in
Avatar of princyrajan
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.FontUnderline
   fnt.Strikethrough = CommonDialog1.FontStrikethru
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.
 
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Try this:

Set DataReport1.Font = fnt
DataReport1.Refresh              '<--- Add this
DataReport1.Show

Anthony
Avatar of princyrajan
princyrajan

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
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
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
Thanks for ur response. if u get any idea, post me.
with regards,
thilak.