Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi XE2: Invisible Firemonkey controls in VirtualBox

I am running a Win7 x64 Pro inside VirtualBox with 2d and 3d acceleration enabled, but most Controls (TButton, TStringGrid, TTabControl, etc.) are invisible inside Delphi. If I run the executable, all controls are rendered fine. How can I make the Controls visible inside Delphi?

It's a freshly installed Delphi XE2 w/ Update 3

To illustrate the problem I made 2 screenshots:

Inside Delphi IDE

enter image description here

Executable

enter image description here

Edit: VirtualBox version is 4.1.8 r75467

like image 821
Gloegg Avatar asked Jan 05 '12 09:01

Gloegg


1 Answers

The problem is that Firemonkey (under Windows) uses DirectX to draw its controls.
(Under OSX/iOS it uses OpenGL)
Prior to Version 3 DirectX is not supported in VirtualBox, for that reason you are not seeing the Firemonkey controls.

However the good news is that VirtualBox 3.0 (and up) does support DirectX, see: http://www.dedoimedo.com/computers/virtualbox-3-directx.html
This does require that you install DirectX drivers in your VirtualBox, see the article.

like image 179
Johan Avatar answered Sep 18 '22 01:09

Johan