Solved

About using font in vb6.0 data report

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 70
Visual Studio 2005 text editor 10 38
TT Auto Dashboard 13 92
VBA: copy range dynamically based on config sheet v2 3 31
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

785 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