Have a program that was all tested out and I have not changed the code, just the images displayed. I can copy the executable/code back to the directory with the old content and it works.
I am marking some images 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 exactly as expected. With a test copy to clipboard added (just to ensure I am not doing something daft later) 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, although it is in the right position.
I have checked that sizemode of scratch is normal and have also created scratch/gr1 by dim immediately before just in case it was some previous use that caused problem and get the same result.
I can't think of any reason, grateful for any suggestions on this.
I am marking some images 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 exactly as expected. With a test copy to clipboard added (just to ensure I am not doing something daft later) 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, although it is in the right position.
I have checked that sizemode of scratch is normal and have also created scratch/gr1 by dim immediately before just in case it was some previous use that caused problem and get the same result.
I can't think of any reason, grateful for any suggestions on this.