Click here to Skip to main content
14,449,458 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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)
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100