Missing / Invisible Controls

It seems to be somehow related to the graphics hardware. We also have a couple of customers who don’t see any “graphics” (Listbox, Canvas - and other “graphics controls”) in Xojo built applications, just the native Win32-GDI controls.
Disabling Aero seems to help. If they don’t want to disable Aero in general, then:

  • Right-Click on the app.exe
  • Properties
  • Compatibility: [X] Disable Desktop Composition

You can do the same in your app by using Windows API:

[code]Declare Function DwmIsCompositionEnabled Lib “Dwmapi” (ByRef pfEnabled As UInt32) As Integer
Declare Function DwmEnableComposition Lib “Dwmapi” (uCompositionAction As UInt32) As Integer
const DWM_EC_DISABLECOMPOSITION = 0
const DWM_EC_ENABLECOMPOSITION = 1

Dim iRes As UInt32
if (DwmIsCompositionEnabled(iRes) = 0) then
if (iRes = 1) then
'Aero is enabled
if (DwmEnableComposition(DWM_EC_DISABLECOMPOSITION) = 0) then
'Aero is now disabled for this application instance
end if
end if
end if[/code]
This should not have any effect on Windows 8 or newer. It might still be better to only do that if you know the app.exe is running on Windows7.

This will disable Aero (Desktop Composition) as long as the app.exe is running (or any other app doing that). After closing the app.exe, Aero will be enabled again (if it was before).

Having said that… it doesn’t make the best impression to users working with Xojo built applications on Windows 7…
…just: how can Xojo fix this? We obviously can’t give them a “reproducible example”, since this happens only in some hardware configurations and doesn’t seem to be reproducible in a VM. So their answer most likely will be: “won’t fix” :frowning: