Results 1 to 2 of 2

Thread: [RESOLVED] Bizarre font size problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    165

    Resolved [RESOLVED] Bizarre font size problem

    Have a program that was all tested out and I have not changed the code, just the images displayed. (It's still ok with the previous set of images).

    All I am doing is marking those images that do not match my criteria with an "X" in one corner but for some reason this is drawing at a huge fontsize although the debugger tells me the fontsize is as expected. With a test copy to clipboard added the relevant code is:

    Private scratch As New PictureBox
    Private gr1 As Graphics
    ...
    gr1 = Graphics.FromImage(scratch.Image)
    gr1.DrawString("X", MainBox1.Font, Brushes.Red, pr.PicTX, pr.PicTY)
    My.Computer.Clipboard.Clear()
    My.Computer.Clipboard.SetImage(scratch.Image)

    Debug tells me that MainBox1.Font = {Name = "Arial" Size=12.0} but when I open the clipboard my "X" is more like fontsize 70!!! I can't think of any reason, grateful for any suggestions on this.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    165

    Re: Bizarre font size problem

    For anyone with same problem, this was due to the new set of images (although they were the same size in pixels and looked same on monitor) somehow having a small size in inches and a high pixels per inch value in properties. Not seeing any way to set this from PSP I copied to clipboard, pasted into Paint and resaved. Problem sorted.
    Last edited by xoggoth; Mar 6th, 2008 at 10:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width