Posted 9 January 2023, 3:53 am EST
This is an issue I’m having with printing from TrueDBGrid. I am setting my font manually in code like so:
EJGrid.Font = New System.Drawing.Font("Lucida Console", 10, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
And I am using print and print preview with the following code:
' Preview
EJGrid.PrintInfo.PrintPreview()
'Print
Dim pd As PrintDialog = New PrintDialog()
If pd.ShowDialog() = DialogResult.OK Then
EJGrid.PrintInfo.Print(pd.PrinterSettings)
endif
My problem is that if the user has their system font size set to greater than 100%, like 125%, both the preview and the printed result has a font that is reduced in size to almost unreadable. I can’t find any DPI scaling properties for the grid or the printing. How can I ensure that my printed font always appears as it does when the system font scaling is set to 100%? Thank you