HiPDI drawing not working

Got most of my hand-drawn stuff successfully converted to proper HiDPI. One small sub-project isn’t working in HiDPI. The icons are drawn non-HiDPI. What am I doing wrong?

From the Paint event:

[code]dim theWidth as Integer = 32
dim theHeight as Integer = 17
dim BaseOffSet as Integer = 3

dim thePicture as new Picture(me.Width, me.Height, 32)
thePicture.Graphics.ForeColor = RGB(233, 233, 233)
thePicture.Graphics.FillRect(0, 0, me.Width, me.Height)

if DaysOfTrialGone = 0 and NoOfDaysTrial = 0 then Return

'trial expired
if NoOfDaysTrial - DaysOfTrialGone <= 0 then

for currentDay as Integer = 0 to NoOfDaysTrial - 1
thePicture.Graphics.DrawPicture button_red, (theWidth + 2) * currentDay + BaseOffSet, 2 + BaseOffSet
next
else

'trial ongoing
dim Rest as double = DaysOfTrialGone / NoOfDaysTrial

for currentDay as Integer = 0 to DaysOfTrialGone - 1
If (Rest >= 0.75) then
thePicture.Graphics.DrawPicture button_red, (theWidth + 2) * currentDay, 0
ElseIf (Rest >= 0.5) then
thePicture.Graphics.DrawPicture button_yellow, (theWidth + 2) * currentDay, 0
elseif (Rest < 0.5) then
thePicture.Graphics.DrawPicture button_green, (theWidth + 2) * currentDay, 0
end if
next

for currentDay as Integer = DaysOfTrialGone to NoOfDaysTrial - 1
thePicture.Graphics.DrawPicture button_grey, (theWidth + 2) * currentDay, 0
next
end if

g.DrawPicture thePicture, 0, 0[/code]

Test project is available at https://www.mothsoftware.com/downloads/Thermometer.zip . Open, click button to test.

You wrote this in 2018, I loaded it with 2016, so this might be part of my question
But are those images in an IMAGESET? they don’t appear so to me… and I thought that was how/where Xojo decided which exact image to use

Urghhh… sorry. Wrong project.

I need better eyes.

Thanks, Dave. And you know what I write better than myself : - )

So there were not in Imagesets, and that fixed it for you? :slight_smile:

Just bad eyes. I had the imagesets in the main project and thought that the drawing wasn’t correct.