Solved

About using font in vb6.0 data report

Posted on 2002-07-15
4
729 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
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
Try this:

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

Anthony
0
 

Author Comment

by:princyrajan
Comment Utility
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
Comment Utility
I am sorry, I have no idea.  Perhaps someone else can make a suggestion.

Anthony
0
 

Author Comment

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now