picture.graphics.drawpicture problem on Win7 32-bit since Xojo 2017r1

Hi there,

I have an application running since Real Studio 2012r2.1 without any problems.
Since Xojo 2017r1 users are experiencing a problem on Windows 7 32-bit systems (Service Pack 1).
When I am using picture.graphics.drawpicture to rescale a picture, the picture does not appear on Windows 7 32-bit.
On any other systems I have no complaints. When recompiling with Xojo 2016r4, the problem is solved.
I don’t want to get stuck on old Xojo-Versions. Can somebody help?

Here’s the program code which is executed when the user is clicking a small picture in order to see a large preview window:

Dim ratio as Single
Dim w, h as integer
Dim Breite, Höhe as Integer

Dim myFile as FolderItem = SpecialFolder.Preferences.Child("image" + str(me.index) + ".jpg") 'Laden aus Unterordner "Anwendungsdaten"
ImagePreview.Vorschaubild.Image = Picture.Open(myfile)

'Bildformat ermitteln
ratio = ImagePreview.Vorschaubild.image.width / ImagePreview.Vorschaubild.image.Height

w = ImagePreview.Vorschaubild.Width 'Maximale Breite gibt das Bild-Steuerelement vor
h = ImagePreview.Vorschaubild.Height 'Maximale Höhe gibt das Bild-Steuerelement vor

if ratio > 1 then 'Bild im Querformat?
  Breite = Min(w, ImagePreview.Vorschaubild.image.Width)
  Höhe  = Breite / ratio
else 'Bild im Hochformat!
  Höhe = Min(h, ImagePreview.Vorschaubild.image.Height)
  Breite = Höhe * ratio
end if

dim pic as new picture(ImagePreview.Vorschaubild.Width, ImagePreview.Vorschaubild.Height, 32)
pic.graphics.drawpicture ImagePreview.Vorschaubild.Image, 0, 0, Breite, Höhe, 0, 0, ImagePreview.Vorschaubild.Image.width, ImagePreview.Vorschaubild.Image.height
ImagePreview.Vorschaubild.Image = pic

ImagePreview.Visible = true
app.DoEvents
ImagePreview.Refresh
ImagePreview.SetFocus

How about putting together a sample project? There’s been a LOT of changes in the last 5 years, and it would be helpful to see exactly what your project looks like.

Also, what scale are you using in the system display settings?