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
6
votes
2 answers

Are there guidelines for updating C++Builder applications for C++Builder 2009?

I have a range of Win32 VCL applications developed with C++Builder from BCB5 onwards, and want to port them to ECB2009 or whatever it's now called. Some of my applications use the old TNT/TMS unicode components, so I have a good mix of AnsiStrings…
Roddy
  • 66,617
  • 42
  • 165
  • 277
6
votes
3 answers

How do I prevent two align to bottom controls from reversing order?

I have a form with three main components: A FlowPanel that is set to Align to Client A second FlowPanel set to Align to Bottom A StatusBar set to Align to Bottom. Everything starts out looking great. But the FlowPanel that is aligned to the…
Mark Elder
  • 3,987
  • 1
  • 31
  • 47
6
votes
1 answer

How can a control be notified when its parent receives and loses focus in Delphi?

As the title says, I'd like a component (say, a label) to be notified when it's parent (say, a panel) receives and loses focus. I wandered a bit in Delphi source, in hope of using TControl.Notify, but it's only used to notify child controls of some…
iMan Biglari
  • 4,674
  • 1
  • 38
  • 83
6
votes
2 answers

Conflicting AutoSize and AutoWrap in TFlowPanel

I am trying to use TFlowPanel component in the following manner: Place on the main form Form1 component FlowPanel1: TFlowPanel. Set Form1.Width = 400, FlowPanel1.Align = alTop, FlowPanel1.AutoSize = True, FlowPanel1.AutoWrap = True. Place on…
user1102040
6
votes
2 answers

What 4 threads are running under an empty new VCL forms application?

Possible Duplicate: What are the other threads in a default VCL application, and can they be named by purpose? When running a new empty VCL Forms Application in Delphi XE2 (32bit), I see 4 threads running in the Task Manager for this app.…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
6
votes
3 answers

C++ Builder XE2, TXMLDocument 'DTD is prohibited'

When I try to read an XML document (eagle file) with an DTD I get the error: Project xx raised exception class EDOMParserError with message 'DTD is prohibited' The XML header looks like this:
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
6
votes
1 answer

Aggregating a calculated field in TClientDataset

Is it possible to add an aggregate field over a calculated field? Suppose there is a cds with following fields: ID(autoincrement) Name(string) Price(float) Quantity(integer) Total(integer) - calculated field - Price * Quantity and I want to add an…
DreadAngel
  • 772
  • 11
  • 30
6
votes
3 answers

InstanceClass.NewInstance vs InstanceClass.Create

what different between InstanceClass.NewInstance+Instance.Create and InstanceClass.Create; Method1: Instance := TComponent(InstanceClass.NewInstance); Instance.Create(Self); Method2: Instance := InstanceClass.Create(Self); Which is better?
MajidTaheri
  • 3,813
  • 6
  • 28
  • 46
5
votes
1 answer

Alternative to calling the Loaded method explicitly for dynamically created instances of a VCL component in Delphi 6?

I have several custom VCL components that do important tasks in their override of the TComponent Loaded() method. This creates a nuisance when creating instances dynamically since the Loaded() method is not called by the Delphi global loader during…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
5
votes
4 answers

Displaying hints

I have added hints to components on my form. When the components receive the focus, I'd like to set the caption of a label component to display the hint. I have added a TApplicationEvents object and set the OnShowHint event to procedure…
Sam M
  • 4,136
  • 4
  • 29
  • 42
5
votes
1 answer

How can I push a TWSocket's OnDataAvailable() event to a background thread in my Delphi 6 application?

I have a Delphi 6 application that uses the ICS component suite to do socket communications. I have my own server socket VCL component that creates client TWSocket sockets when a new session becomes available. The client sockets I create do have…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
5
votes
3 answers

How to "scan" the full list of currently-installed VCL components

I still haven't found a truly satisfactory answer to this question, and am now considering rolling my own. I have ModelMaker and GExperts, and neither seems to load the comprehensive class-hierarchy I am looking for. As well, I don't think the…
Jamo
  • 3,238
  • 6
  • 40
  • 66
5
votes
1 answer

How can I implement themes support in my own component?

I'm trying to make my own component that will be themed the same as the rest of application (the theme is set in Project > Options > Application > Appearance). The control is derived from TWinControl (in the red frame below). How can I apply the…
Pshemas
  • 146
  • 4
5
votes
2 answers

Delphi - Using the TApplicationEvents OnShortCut event to detect Alt+C key presses

I am using TApplicationEvents OnShortCut event to get application keyboard short cuts in a Delphi program. Using the following code: procedure TForm1.ApplicationEvents1ShortCut(var Msg: TWMKey; var Handled: Boolean) ; begin if (Msg.CharCode =…
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
5
votes
2 answers

Delphi 11 Alexandria PaintBox flicker in RDP

I've just upgraded to Delphi 11 Alexandria from Delphi 10.4.2. I use RDP a lot so I noticed flicker when a TPaintBox is invalidated. The weird thing is that it doesn't flicker if the form with the TPaintBox is the first one created. Also it doesn't…
Rogfitz
  • 61
  • 2