Solved

About using font in vb6.0 data report

Posted on 2002-07-15
4
734 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

920 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

17 Experts available now in Live!

Get 1:1 Help Now