Questions tagged [vcl]

This tag is used for questions regarding the Visual Component Library used in Borland/CodeGear/Embarcadero Delphi and C++Builder products as well as Python GUI apps. Do not confuse this with the Varnish Configuration Language (VCL). Use the "varnish-vcl" tag for questions related to that product.

Visual Component Library is a visual component-based object-oriented framework tightly integrated with Delphi and C++Builder. It's also available for Python as a GUI framework.

VCL components cover visual and non-visual components like:

  • Windows common controls
  • Database access components
  • Internet connection components

The component approach allows programmers to extend easily the VCL.

Resources:

1590 questions
16
votes
12 answers

Determine if running as VCL Forms or Service

I have code which is used both in services and within VCL Form applications (win32 application). How can I determine if the underlying application is running as a NT Service or as an application? Thanks.
M Schenkel
  • 6,294
  • 12
  • 62
  • 107
15
votes
3 answers

Changing component class at run-time on demand

My Question is similar to the idea here: Replacing a component class in delphi. But I need to change a specific component(s) class on demand. Here is some pseudo demo code: unit Unit1; TForm1 = class(TForm) ImageList1: TImageList; ImageList2:…
kobik
  • 21,001
  • 4
  • 61
  • 121
15
votes
6 answers

Why Do Some Delphi Components Require "AOwner: TComponent" To Construct Them?

It seems completely irrelevant to require a TComponent as an owner to instantiate an object of some kind. Why are there so many Delphi components that require this? For example, TXMLDocument requires a TComponent object to instantiate. Why is this…
Dave
  • 5,436
  • 11
  • 48
  • 74
15
votes
6 answers

Is there any way to get all the controls on a container control?

I've got a form with a bunch of controls on it, and I wanted to iterate through all the controls on a certain panel and enable/disable them. I tried this: var component: TComponent; begin for component in myPanel do (component as…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
15
votes
1 answer

How to make a single component support both VCL and FMX?

I have a TComponent which controls some of the UI. This component is designed to support both VCL and Firemonkey by using conditionals. Such conditionals instruct my component whether to accept a VCL control or an FMX control. It's currently…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
15
votes
1 answer

Looking for radial popup menu component for Delphi

Radial menus have started appearing in several places. I'm curious whether anyone has seen or is working on a radial menu component for Delphi? We have a concept of what we'd like, shown in the animated gif at…
Jon Robertson
  • 591
  • 6
  • 18
15
votes
1 answer

Tag editor component for Delphi/C++Builder

I need a VCL tag editor component for Delphi or C++Builder, similar to what's available for JavaScript: e.g. this one, or this one or StackOverflow's own tags editor. Is there something like this available or do I need to make it from scratch? Some…
riot_starter
  • 1,218
  • 15
  • 28
14
votes
2 answers

Delphi Rest.JSON JsonToObject only works with f variables

I'm using Delphi XE8. I was just looking at the REST.Json ObjectToJsonString() and JsonToObject() calls. Mainly attempting to do something like this: How to convert an object to JSON and back with a single line of code I noticed that I could only…
Dangas56
  • 849
  • 1
  • 8
  • 32
14
votes
2 answers

Ugly "disabled" images of TMainMenu

Delphi 2010, Win32 VCL. I need to create a main menu for my application with the most standard look. TMainMenu looks nice in all Windows versions, the only bad thing is when it displaying images for items with Enabled=False. Delphi has some strange…
Andrew
  • 3,696
  • 3
  • 40
  • 71
14
votes
11 answers

How to make a Delphi TSpeedButton stay pressed if it's the only one in the group

I'm not sure why the TSpeedButton has this property but when a TSpeedButton is the only button of a given groupindex, it doesn't stay pressed, whether or not "AllowAllUp" is pressed. Maybe a Jedi control would suffice, but hopefully there's some…
Peter Turner
  • 11,199
  • 10
  • 68
  • 109
14
votes
2 answers

How to set ExitCode in a VCL Forms Application

I can't get ExitCode to work for a VCL forms application. Here is my test application. It was created from the File / New menu in the Delphi 2007 IDE. The only change is that I added the line ExitCode := 42; at the end. program Test; uses Forms, …
dan-gph
  • 16,301
  • 12
  • 61
  • 79
14
votes
4 answers

Delphi VCL for Win32 - multiple event handlers

I'm looking for some code allowing easy asigning many event handlers to a single event of object... I needed it very much for my plugin architecture, so I implemented some replacement for that, however I don't like my solution for that, so I'd like…
migajek
  • 8,524
  • 15
  • 77
  • 116
13
votes
2 answers

DecimalSeparator in SysUtils and System.SysUtils

I need to find DecimalSeparator var SysUtils Delphi 7, in Delphi XE6 i tried to find in System.SysUtils, but without success. Someone can tell me where to find her in Delphi XE6? In Delphi 7 it is located in SysUtils.pas unit, in line 618: var   …
Linces Marques
  • 644
  • 1
  • 10
  • 24
13
votes
1 answer

TControlState.csDesignerHide vs. TControlStyle.csNoDesignVisible

The VCL seems to offer two mechanisms for hiding controls from form designers : TControlState.csDesignerHide and TControlStyle.csNoDesignVisible. What's the difference between them as far as the IDE is concerned? Which should you use when?
Roddy
  • 66,617
  • 42
  • 165
  • 277
13
votes
1 answer

How to NOT cache 500 Internal Server Errors in Varnish

I can't figure out, for the life of me, how to get varnish to ignore caching of 500 internal server errors. Basically, if someone hits varnish and is returned a 500 internal server error, I want varnish to not cache that page (set a 0s ttl/grace…
Herman
  • 242
  • 1
  • 2
  • 10