vcl

How do I add support for actions in my component

谁说我不能喝 提交于 2019-12-18 05:59:10
问题 What do I need to do for adding actions support to my component. It is a button component but I guess it is the same for whatever component type it is. Any information or how to will help. 回答1: That depends on how you define action support . There is two kinds: A possibly customized Action property of your component, which is assignable by an Action component The Action component itself. An action property Every TControl descendant has an Action property which execution is by default linked

How to make hovering over Minimize, Maximize, and Close buttons behave?

蓝咒 提交于 2019-12-18 03:11:39
问题 In a Delphi application, when you hover over a border icon, e.g.: Minimize Maximize Restore it doesn't behave correctly: Compare to an application that does behave correctly: Step to Reproduce Click File , New , VCL Forms Application - Delphi Click Run (F9) Hover over the Minimize, Maximize, or Close buttons. How to fix? Windows 10, 64-bit (running natively on desktop PC) Delphi XE6 Edit - It also fails with Delphi 7: and in Delphi 5: and in Delphi 4: I assumed (i.e. was afraid) that it was

Why does a MessageBox not block the Application on a synchronized thread?

£可爱£侵袭症+ 提交于 2019-12-18 02:57:35
问题 As far as I understand and know the method of the TThread Class, if you synchronize your code, it actually get's executed in the main Application Thread (just like a timer/buttonclick/etc.) I've been playing around and noticed that a MessageBox DOES NOT block the main application, however sleep does just as expected. Why is that? type TTestThread = class(TThread) private procedure SynchThread; protected procedure Execute; override; public constructor Create(CreateSuspended: Boolean); end;

Disabling progress bar animation on Vista Aero

天涯浪子 提交于 2019-12-17 19:48:44
问题 I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge. On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge. Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control? To clarify, I want something basically identical to the 'disk space used' meters in Windows Explorer. No animation, but still with a nice border and shading effects. Update: I

When does a ShortCut fire?

a 夏天 提交于 2019-12-17 18:54:19
问题 Yesterday I discovered a situation wherein a keyboard ShortCut did not fire when I was expecting it to. The specific situation was: I pressed the ShortCut key combination for an Action of an ActionList on an MDI child, while a side bar on the MDI form was focussed. I always was under the impression that ShortCuts would work globally. In exactly which circumstances do or do they not fire? 回答1: That's a deceptively simple question with a surprisingly long answer. First I will deal with some

How to detach a panel and show it in a separate window?

こ雲淡風輕ζ 提交于 2019-12-17 09:57:48
问题 Let's say I have form A that contains a panel (with many other controls in it) and a form B that it is empty. Can I programmatically detach the panel from form A and move it in form B (and maybe back to form A)? I know that I can change the Owner of the panel but does it work between different forms? Update: After some Googling I see that there is a ParentWindow property. 回答1: You can easily have something appear as if it was a panel, and also as a form, by really using a TForm for what you

Will a Delphi form always fire OnResize when it's shown?

萝らか妹 提交于 2019-12-14 01:27:58
问题 If I create a new Delphi form, hook its OnResize event, and run the app, OnResize is fired before the window is shown. What I don't know is whether this will always happen, for any window. (For anyone familiar with the Windows API, I've traced it to the ShowWindow call in TCustomForm.ShowingChanged (Forms.pas line 5503 in Delphi 2007), which apparently triggers a WM_SIZE ... at least, for a new window with no other properties set. I haven't seen it documented that ShowWindow always fires WM

How to have both VCL and FMX in one application?

99封情书 提交于 2019-12-13 15:04:49
问题 I have a VCL application and pretty isolated VCL code. I would like to include Fire Monkey forms for Mac OSX support. I plan using heavily IFDEF to determine should I build for Windows with VCL or for Mac OSX with FireMonkey. Unfortunately there is no way to add MacOS platform from the Project Manager if the application is VCL one. Is there a way to hack this somehow? Maybe manually tweak the .dpr and .dproj files? 回答1: What about doing it the other way around: start with a FireMonkey

Creating a custom caption bar and border at runtime, TMainMenu acting up

坚强是说给别人听的谎言 提交于 2019-12-13 13:26:31
问题 I'm working on a rather large project that uses custom forms and would like to draw the non-client area of these forms myself. I can't use vcl-styles because many of the forms need to have a caption bar and border in a color picked at run time and as far as I know, styles are application wide by design. What I have accomplished so far is drawing the caption bar and border, drawing on the caption, disabling the minimize, maximize and close buttons and replacing them with my own. I achieved

c++ builder teeChart import timetag in text file

家住魔仙堡 提交于 2019-12-13 10:31:28
问题 I import a text file (with x and y coordinates) on teeChart . There are times like seconds that I want to do with the text to fill in. Adding the this time and x and y coordinates to the teechart when the program runs. I work on rad studio c++ builder vcl form app. Example 0.3 second add (3,5) Example text file: timetag X Y 0.3 10 5 ı cant use time. not all code only addcordinate button and openfile button void __fastcall TForm1::AddCordBtnClick(TObject *Sender) { Series1->Clear();