vcl

VCL Style from DLL is affecting TMenuItem in Application

五迷三道 提交于 2019-12-19 17:47:54
问题 I am using Delphi XE6 and VCL styles. I have main application and dlls. My main application has enabled runtime themes and I am using vcl style files. I did quite similar thing to my DLLs. I enabled runtime themes and added VCL.Themes, VCL.Styles under uses and resource file with VCL style file within it. When DLL is loaded I load VCL style from resources and set it for DLL gui. Main app and DLL are not built with runtime packages. Now I have main app GUI styled with own style and DLL gui

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

隐身守侯 提交于 2019-12-19 15:44:08
问题 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 expected that this conditional is defined on the application level to instruct the component in run-time whether it's to manage a VCL or FMX control. I'd like to publish my component into the IDE with support for both VCL and FMX, sharing the same unit

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

瘦欲@ 提交于 2019-12-19 15:43:00
问题 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 expected that this conditional is defined on the application level to instruct the component in run-time whether it's to manage a VCL or FMX control. I'd like to publish my component into the IDE with support for both VCL and FMX, sharing the same unit

How do i custom draw of TEdit control text?

痞子三分冷 提交于 2019-12-19 09:09:43
问题 I'd like to draw a piece of TEdit.Text using Font.Color different from the default. Are there any examples how to do that? I'm attempting to do something like this: NOTE: what this screenshot pictures is merely a hairy draft, but it convinces me what problem solvable. 回答1: Edit controls do not have owner-draw support, but you can custom-draw it by sub-classing it and handling WM_PAINT (among many other messages). It's doable, but it would be a world of pain to actually implement 100%

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

送分小仙女□ 提交于 2019-12-18 19:24:09
问题 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 fix. Any help or anecdotes are appreciated. BTW, I'm (still) using Delphi 7, not sure if this is an across the board conundrum. 回答1: I have no D7 here, but in D2006 a Speedbutton stays down if the GroupIndex has a value > 0. If this is not the

Why RegisterClass fails with ERROR_NOT_ENOUGH_MEMORY?

自作多情 提交于 2019-12-18 15:47:09
问题 Shortly, my question is, why can WinAPI RegisterClass fail with ERROR_NOT_ENOUGH_MEMORY , when there is a lot of memory free, and what can I do to prevent it? Background: I'm developing an application (WinSCP FTP/SFTP client) that many people use for automating file transfers. Some are running it every minute, every day, from a Windows Scheduler. I'm getting a lot of reports that after a certain number of runs the application stops working. The number of runs to trigger the problem does not

Why RegisterClass fails with ERROR_NOT_ENOUGH_MEMORY?

只谈情不闲聊 提交于 2019-12-18 15:47:07
问题 Shortly, my question is, why can WinAPI RegisterClass fail with ERROR_NOT_ENOUGH_MEMORY , when there is a lot of memory free, and what can I do to prevent it? Background: I'm developing an application (WinSCP FTP/SFTP client) that many people use for automating file transfers. Some are running it every minute, every day, from a Windows Scheduler. I'm getting a lot of reports that after a certain number of runs the application stops working. The number of runs to trigger the problem does not

Remove and Replace a visual component at runtime

守給你的承諾、 提交于 2019-12-18 13:28:42
问题 Is it possible to, for instance, replace and free a TEdit with a subclassed component instantiated (conditionally) at runtime? If so, how and when it should be done? I've tried to set the parent to nil and to call free() in the form constructor and AfterConstruction methods but in both cases I got a runtime error. Being more specific, I got an Access violation error (EAccessViolation). It seems François is right when he says that freeing components at frame costruction messes with Form

Make 2 forms able to overlap each other?

给你一囗甜甜゛ 提交于 2019-12-18 08:29:14
问题 I would like to have a seperate form that shows "along" with my main form, so it does not overlap the main form. Here's an example: Notice how the main program, overlaps the log? I can't figure out how to do that in Delphi. Thanks! 回答1: The answers to this question lie in the very useful Window Features MSDN topic. The pertinent information is: An overlapped or pop-up window can be owned by another overlapped or pop-up window. Being owned places several constraints on a window. An owned

How to prevent form from being activated when the users clicks on it?

寵の児 提交于 2019-12-18 07:08:27
问题 I have a main form and non-modal autocomplete form. How can I prevent the autocomplete form from being activated by the user, when the user clicks on the list in the autocomplete form? So, basically I want the autocomplete form the receive the mouse click message when the users clicks, but to never become active, because it causes problems with a third-party component in the main form over which I have no control. 回答1: Override CreateParams method of your form and add WS_EX_NOACTIVATE style