Solved

About using font in vb6.0 data report

Posted on 2002-07-15
4
741 Views
Last Modified: 2013-12-03
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.
 
0
Comment
Question by:princyrajan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7154333
Try this:

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

Anthony
0
 

Author Comment

by:princyrajan
ID: 7156609
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
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 7157203
I am sorry, I have no idea.  Perhaps someone else can make a suggestion.

Anthony
0
 

Author Comment

by:princyrajan
ID: 7164471
Thanks for ur response. if u get any idea, post me.
with regards,
thilak.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question