Hi, everyone
Yesterday I've ran across the problem whose repro code is shown below. In my own words, problem is I have the same bitmap loaded in multiple image controls. Depending on position on form, some of the bitmaps need to be rotated/flipped. However, when I rotate/flip an image, all of them are rotated/flipped, even though their .RotateFlip property does not change. Also, the BackStyle property is ignored - it looks like is set to 1, even it is definately set to 0.
I am aware VFP loads the image only once in memory and uses it to draw the image whenever it appears, however, I'd qualify this weird .RotateFlip behavior as a bug, because if I resize one of the images, the other one does not change. IOW, no matter what I do with one of the images, the others do not reflect the changes, unless I .RotateFlip it.
So, what do you think, guys? Does this qualifies for a bug report?
Here is the repro code. Run it, click the button, click outside the form, then click the button again.
Public oForm As MyForm
oForm = CreateObject("MyForm")
oForm.Show
Define Class MyForm As Form
AutoCenter = .T.
Caption = "Is this a bug or what?"
Width = 200
Add Object cmd As CommandButton With Height = 24, ;
FontName = "Tahoma", FontSize = 8, ;
Caption = "Click to flip first image", ;
Width = 140, Top = 220, Left = 35
Add Object img1 As Image With ;
Picture = Home(4) + "Bitmaps\Gauge\Dome.bmp", ;
BackStyle = 0, Top = 20, Left = 20
Add Object img2 As Image With ;
Picture = Home(4) + "Bitmaps\Gauge\Dome.bmp", ;
BackStyle = 0, Top = 20, Left = 120
Procedure cmd.Click
ThisForm.Img1.RotateFlip = 2
Wait Window "Second image's .RotateFlip property: " + Transform(ThisForm.Img2.RotateFlip)
Wait Window "Second image's .BackStyle property: " + Transform(ThisForm.Img2.BackStyle)
EndProc
EndDefine
Grigore Dolghin
Class Software.