That was the easy part
but I’d be interested in why this isn’t in the Display class as it must be called to get the dimensions of the display in the first place. Just a proof of concept, its rough code borrowed and tweaked from the old RB forum I believe, it need tweaking to detect when the app moves to a different monitor etc. however I might not need it if I can drop the FPS limiter altogether.
[code]Public Function DisplayFrequency() as Integer
dim frequency as Integer = 0
#IF TargetWin32
Const ENUM_CURRENT_SETTINGS = -1
Const ENUM_REGISTRY_SETTINGS = -2
Declare Function EnumDisplaySettingsW Lib “user32” Alias “EnumDisplaySettingsW” ( Null as Integer, ModeNumber As Integer, DevMode As Ptr ) As Integer
dim devMode as MemoryBlock = new MemoryBlock( 188 )
if EnumDisplaySettingsW( 0, ENUM_CURRENT_SETTINGS, devMode ) = 0 then
Return 0
end if
frequency = devMode.Long( 184 )
#ENDIF
Return frequency
End Function
[/code]
I was looking through ListBox.Refresh again just in case I missed something and I did, I noticed that it could take a parameter for erasing the background so I gave it a try, heck why not I’ve tried just about everything else.
Smooth as silk!!! with just two lines of code. The only issue I am noting is that the radio doesn’t draw correctly until you slow/stop the move. I’ll come back to that further on.
ContainerControl11.Left = 0-me.value
ContainerControl11.Refresh(false)
Now this has me wondering. Shouldn’t there be a massive trail of the controls if I have passed false to Refresh? I’m asking for a redraw of the whole container control and not asking it to render the background, yet it is performing a full wipe/clear of the container before refreshing the controls.
If Refresh(true) does blank the background why is it doing so when I send false? Are there two background wipes going on with Refresh(true) and by setting Refresh(false) I’m actually disabling one of them and eliminating a flicker problem?
Just a thought. What do you think?
Now about the radio problem (again with just the two lines of code), see here:

As you can see the radio isnt drawing until it has time. Being the only control that does this I’m wondering if there’s an issue with it in the framework. Of course it works if I put in Michel’s FPS limit code from above but I’d like to try and get this as clean as possible.
What do you think?