Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my code is
VsfgShowRpt.PrintParameters.PrintDocument.DefaultPageSettings.Margins.Left = 5.0
VsfgShowRpt.PrintParameters.PrintDocument.DefaultPageSettings.Margins.Right = 50.0
VsfgShowRpt.PrintParameters.PrintDocument.DefaultPageSettings.Margins.Top = 150.0
VsfgShowRpt.PrintParameters.PrintDocument.DefaultPageSettings.Margins.Bottom = 150.0

VsfgShowRpt.PrintGrid(DlblHeading.Text, PrintGridFlags.ShowPreviewDialog, s, "Page No")

i want change the header strig s font size to 12
Posted

1 solution

I'm going to make a couple of assumptions here ...

I'm assuming that you mean "How do I change the font for the Header when printing a FlexGrid in VB6" ... if this is not what you meant then use the "Improve Question" link to add the required information.

Try this
VsfgShowRpt.PrintParameters.HeaderFont = New Font("Tahoma", 10, FontStyle.Bold)
 
Share this answer
 
Comments
Hemant L Patil 15-Jul-14 7:59am    
it is work correctly but

I Have Three Line Header these change both 3 thine size
but i want only first line size change
CHill60 15-Jul-14 8:06am    
I don't think you can do that (may be wrong). What grid are you using?
CHill60 15-Jul-14 8:24am    
I think you are going to be stuck with either the whole lot in the same font, or moving the 2nd and 3rd lines into the MSFlexGrid itself. Alternatively convert the whole lot to a DataReport, or output to Word or Excel for printing. A technique I used recently was to generate XML, combined with CSS/XSL to create an HTML report, then just used the preview capability of the browser control

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900