7

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

Johan
  • 74,508
  • 24
  • 191
  • 319
Gloegg
  • 380
  • 3
  • 12
  • 2
    That looks like a bug. Submit a QC report. – David Heffernan Jan 05 '12 at 09:46
  • why you hadn't insert the pictures in the question? – RBA Jan 05 '12 at 09:57
  • 1
    @RBA Low rep users aren't allowed to include images inline. I've edited them in. – David Heffernan Jan 05 '12 at 10:12
  • 1
    As far I know , [virtualbox is not supported](http://edn.embarcadero.com/article/41688) for firemonkey. – RRUZ Jan 05 '12 at 12:25
  • @RRUZ I'm running VirtualBox here, and FireMonkey works perfectly (design-time and runtime). It needs to be said that it didn't work until I installed the Guest Additions *in safe-mode*, which (if you read the messages properly) it instructs you to do in order to acquire DirectX support! – LaKraven Jan 06 '12 at 02:05

2 Answers2

3

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.

Johan
  • 74,508
  • 24
  • 191
  • 319
  • I installed the Direct3D support and DirectX like in the description and I even got Unreal Tournament to run. Delphi, however, still refuses to render the controls in the IDE. – Gloegg Jan 05 '12 at 16:03
  • 1
    FireMonkey doesn't use Direct3D (or DirectX of any kind) at Design-Time... it uses GDI+. You've also overlooked when asnwering that DirectX is working in the VM at run-time, but not at design-time. This indicates a possible bug. – LaKraven Jan 06 '12 at 02:11
1

Install Guest Additions from Safe-Mode (remembering to select DirectX support when prompted). Make sure you are running a relatively-recent (4 or newer) version of VirtualBox.

Install all Windows Updates (as it's very possible one of these updates addresses certain VM-related issues for Windows 7).

This is all I have done, and FireMonkey works perfectly for me both at design-time and run-time!

If you do all this and still the controls are invisible at design-time... I strongly suggest reinstalling Delphi as I know others whom have had the same issue, and a reinstall has resolved it for them.

LaKraven
  • 5,804
  • 2
  • 23
  • 49
  • Having to reinstall Delphi is what I wanted to overcome by moving to a Virtual Machine. Well, since nothing else worked, i will do that. – Gloegg Jan 06 '12 at 16:05
  • The beauty, though, is that once it's reinstalled... you shouldn't have to reinstall it again! – LaKraven Jan 06 '12 at 19:45