vcl

Why do my Borland C++Builder 5 forms with right-anchored controls appear incorrectly on Vista?

雨燕双飞 提交于 2019-12-08 06:53:03
问题 Having spent a small age looking for the solution and having now found it, I figured this would be good to document for Stack Overflow. So my answer will follow right after this question. I was using Borland C++ Builder 5. This probably also applies to the equivalent version of Delphi. I had a form with a TButton on a TPanel. The button was set to akRight,akBottom. On XP and prior Windows, everything was fine. On Vista, using Aero, the button appeared 4 pixels too far to the right. The

Error opening a dfm file - Class xxxx not found

给你一囗甜甜゛ 提交于 2019-12-08 06:48:13
问题 While opening a dfm file by double clicking, I am getting following error: Class TMyClass not found. Ignore the error and continue? Note: Ignoring the error may cause components to be deleted or property values to be lost. When I click Cancel, I get following message Error creating form: Class TMyClass not found. When I click OK now, pas file is opened only. In pas file MyClass unit is added (which conatins the TMyClass defination) and its path is also added in my search path (Ctrl clicking

Numeric edit control with flat button inside and no calculator

折月煮酒 提交于 2019-12-08 06:09:49
问题 I'm writing a C++ project with RAD Studio, but this also applies to Delphi. I need an edit control where user can only enter floats (2 decimal places) and can restore the original value (taken from a variable, not important here) clilcking on a button (actullay an icon) inside the edit control itself. This is what I've done, using a TJvCalcEdit from JEDI library. Control definition: object Sconto1: TJvCalcEdit [non-important attributes...] ButtonFlat = True Glyph.Data = {

Delphi 6 : breakpoint triggered on non-VCL thread stops main thread repaints

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 04:08:55
问题 I have a multi-threaded Delphi 6 Pro application that I am currently working on heavily. If I set a breakpoint on any code that runs in the context of the Main thread (VCL thread) I don't have any problems. However, if a breakpoint is triggered on any code in one of my other threads, after I continue the application from the breakpoint, all repaints to the VCL components on the main thread (including the main form) don't happen anymore. The application isn't dead because other background code

TeeChart Pro VCL/FMX教程(六):使用系列(一)

社会主义新天地 提交于 2019-12-07 20:22:00
下载TeeChart Pro VCL/FMX最新版本 系列类型 该TChartSeries组件是所有系列类型的共同父类 系列类结构 作为TeeChart组件库结构的一小部分背景,下面是系列组件及其结构的说明。下图显示了TeeChart系列类之间的关系。所有类都派生自通用的“TChartSeries”类,因此共享“Series”属性和方法。其他几个通用类派生自Series(CustomSeries,CustomBarSeries和CircledSeries),它们以绿色突出显示,并且它们的组件不能直接用于编程,它们的特性由其后代Series类型继承。所有派生系列(红色)均可在TeeChart图库中访问,以包含在您的图表中。以这种方式派生的TeeChart系列允许通过公共索引结构(集合)进行可编程访问。 TeeChart Pro的内部Series Class层次结构 在设计时使用TChart编辑器更容易添加Series,但您也可以在运行时创建新的和不同的Series类型并将其添加到同一个Chart中。 //You could add the Series at runtime procedure TForm1.Button2Click(Sender: TObject); var tmpAreaSeries:TAreaSeries; begin tmpAreaSeries:

Reduce CPU time spent in VCL

吃可爱长大的小学妹 提交于 2019-12-07 15:48:37
问题 It is important for a MIDI player to playback the notes as precisely as possible. I never quite succeeded in that, always blaming the timer (see a previous thread: How to prevent hints interrupting a timer). Recently I acquired ProDelphi and started measuring what exactly consumed that much time. The result was quite surprising, see the example code below. procedure TClip_View.doMove (Sender: TObject; note, time, dure, max_time: Int32); var x: Int32; begin {$IFDEF PROFILE}Profint.ProfStop;

Error opening a dfm file - Class xxxx not found

廉价感情. 提交于 2019-12-07 15:13:35
While opening a dfm file by double clicking, I am getting following error: Class TMyClass not found. Ignore the error and continue? Note: Ignoring the error may cause components to be deleted or property values to be lost. When I click Cancel, I get following message Error creating form: Class TMyClass not found. When I click OK now, pas file is opened only. In pas file MyClass unit is added (which conatins the TMyClass defination) and its path is also added in my search path (Ctrl clicking on unit name, takes me to the unit file) Everything is fine as per me. I don't know why I am getting

How to print TPanel contents?

佐手、 提交于 2019-12-07 13:41:52
问题 I have TPanel. On this Panel there is an TImage descendant , few other panels with controls, etc. In fact, picture contains some diagram, while additional panels with labels are created during runtime to provide user with additional info. Recently I was told, that it would be nice, if it was possible to print this panel, and have it on the paper just as it appears in form. Any clues, how to do it? 回答1: I found an old usenet post that provides a solution, by copying the contents of the panel

How can I fixate form for tablet PC in Delphi XE2?

爱⌒轻易说出口 提交于 2019-12-07 12:05:19
问题 I have a problem. I create a fullscreen form in Delphi XE2. Then I run my application on tablet PC with windows 7 on board where screen resolution is 1024x600. Then I rotate tablet PC (now resolution is 600x1024) and I had some problems with elements on form (some buttons are behind the screen, etc.). Can I configure project so that when I turn the tablet PC my form is not rotate? 回答1: According to this MSDN article you can detect that the screen has been rotated by listening for the WM

What happened to TBitBtn and TButton inheritance chain?

吃可爱长大的小学妹 提交于 2019-12-07 07:05:16
问题 I've recently began to upgrade my RAD Studio 2007 project to RAD Studio 2009. One thing I noticed is when seemingly simple code all of a sudden failed to compile. Example Code: class CButtonPopupMenu { // Snip public: void Init( TButton* SrcButton ) { SrcButton->OnClick = OnButtonClick; } private: void __fastcall OnButtonClick( TObject* Sender ) { // Do some button click stuff } }; // Snip TButton button = new TButton( this ); TBitBtn bitBtn = new TBitBtn( this ); CButtonPopupMenu popupButton