I have several apps making use of Lebans' picture box class. They have worked great for many years, but they have started bombing as users have switched to 64-bit systems. I've tracked it down to the following code, which run great on 32-bit machines and causes Access to shut down on 64-bit ones. If I code around to skip this routine, it bombs anyway. I have no idea why this routine is here, or what to do about it crashing Access. Does anyone know why this would be here in the first place, and more importantly, how to make it work in 64 bits?
Code:
'Scheduled ShutDown of GDI+ handle to avoid memory leaks
Private Sub AutoShutDown()
'Set to 5 seconds for next shutdown
'That's IMO appropriate for looped routines - but configure for your own purposes
If lGDIP <> 0 Then
ReDim Preserve tVarTimer(lCounter)
tVarTimer(lCounter) = SetTimer(0&, 0&, 5000, AddressOf TimerProc)
End If
lCounter = lCounter + 1
End Sub