Have a program that was all tested out and I have not changed the code, just the images displayed. It still works ok with the previous set of images. Marking some images with an "X" in one corner but it is drawing at a huge fontsize although the debugger tells me the fontsize is as expected. With a test copy to clipboard added just to make sure I am not doing something daft later on, 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 180!!! Drawline etc also comes out similarly enlarged. The sizemode of scratch is normal.
I can't think of any reason and can't find owt useful on net so grateful for any suggestions on this.
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 180!!! Drawline etc also comes out similarly enlarged. The sizemode of scratch is normal.
I can't think of any reason and can't find owt useful on net so grateful for any suggestions on this.
Comment