vcl

Fix VCL Styles Directory in Delphi XE3

时间秒杀一切 提交于 2019-12-22 16:46:36
问题 I have a problem about VCL Styles in Delphi IDE. When I change VCL Style From default style to another style in delphi IDE and run program an "Style 'Style Name' not found" error comes up. I trying to find a option in IDE to fix Style directory, but I can't find any options. Please, help me to solve this problem and fixing IDE Options. thanx a lot. 回答1: oh, after a time, I found a way for solving this problem. for solving this problem must running the "redistsetup.bat" file. this file by

Fix VCL Styles Directory in Delphi XE3

左心房为你撑大大i 提交于 2019-12-22 16:46:05
问题 I have a problem about VCL Styles in Delphi IDE. When I change VCL Style From default style to another style in delphi IDE and run program an "Style 'Style Name' not found" error comes up. I trying to find a option in IDE to fix Style directory, but I can't find any options. Please, help me to solve this problem and fixing IDE Options. thanx a lot. 回答1: oh, after a time, I found a way for solving this problem. for solving this problem must running the "redistsetup.bat" file. this file by

Getting a Delphi TTimer to work with a multi-threading app

▼魔方 西西 提交于 2019-12-22 09:57:16
问题 I have an issue with a simple TTimer that's initiated and have its OnTimer event executed in the main app thread , the code looks like this: procedure TForm1.DoSomeStuff(); begin OmniLock.Acquire; try Parallel.Pipeline.NumTasks(MaxThreads).Stage(StageProc).Run; if (MyTimer = nil) then begin MyTimer := TTimer.Create(nil); MyTimer.Interval := 60 * 1000; // timer fired every 60 seconds MyTimer.OnTimer := MyTimerEvent; MyTimer.Enabled := True; end; finally OmniLock.Release; end; // try/finally

How do I allow dragging files for specific control(s) in Delphi

余生颓废 提交于 2019-12-22 08:25:16
问题 I would like to accept files as soon as someone drops a file to a specific control (e.g. TMemo). I started with this example: http://delphi.about.com/od/windowsshellapi/a/accept-filedrop.htm and modified it like this: procedure TForm1.FormCreate(Sender: TObject); begin DragAcceptFiles( Memo1.Handle, True ) ; end; This allows the control to show the dragging icon but the proper WM_DROPFILES message is not getting called because DragAcceptFiles needs a (Parent?)windowhandle. I could determine

How to draw button in title bar like in Google Chrome?

血红的双手。 提交于 2019-12-21 16:56:16
问题 I tried several components from 2000-2001, but none of them works for win7. How do I do it? 回答1: If you are looking for a way to make use of glass frame in Windows 7 using Delphi, you can follow this tutorial. There is also an update available dedicated to a 64 bit bug. You can also look at some examples by Chris Rolliston available on embarcadero developer network. 回答2: Or they probably just draw their own components like a video game would do and they emulated the windows 7 look and feel.

How do I get the SelectedValue of a ComboBox from code?

旧城冷巷雨未停 提交于 2019-12-21 05:41:12
问题 I am trying to build something like a TLookupComboBox using LiveBindings. I have placed a normal TComboBox on a VCL form. I also have a data set with some rows that have the two fields id and text . Then I used the LiveBindings editor to create a TBindSourceDB and a TBindingsList . There is just one binding in it: object BindingsList1: TBindingsList Methods = <> OutputConverters = <> UseAppManager = True Left = 244 Top = 229 object LinkFillControlToField1: TLinkFillControlToField Category =

How do I get the SelectedValue of a ComboBox from code?

倖福魔咒の 提交于 2019-12-21 05:41:00
问题 I am trying to build something like a TLookupComboBox using LiveBindings. I have placed a normal TComboBox on a VCL form. I also have a data set with some rows that have the two fields id and text . Then I used the LiveBindings editor to create a TBindSourceDB and a TBindingsList . There is just one binding in it: object BindingsList1: TBindingsList Methods = <> OutputConverters = <> UseAppManager = True Left = 244 Top = 229 object LinkFillControlToField1: TLinkFillControlToField Category =

Simplifying VCL thread wrapper code

人盡茶涼 提交于 2019-12-21 02:49:12
问题 I am using thread wrapper which checks if function which updates VCL (which also has some arguments) was called from main thread or not and then executes in within the context of Main thread always. It works but I want to make it simpler. The problem is that I have to repeat this code in every function which needs VCL synchronization which is prone to errors. Is there a way to make this wrapper simpler and more re-useable? Note that this particular wrapper only uses one parameter but there

Is there any Delphi XE2 styles gallery?

狂风中的少年 提交于 2019-12-20 09:55:51
问题 In XE2 there is a new function : 'styles', for VCL( .vsf) and Firemonkey ( .styles), and some are provided in C:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles directory. As it seems to be easy to create a new style, is there any 'styles Gallery' Web site or blog somewhere ? 回答1: No, for the moment there is no such thing like a gallery of styles for FireMonkey or VCL styles. But if you want to create you own try these entries in my blog which show an easy way to create/modify new VCL

How can I simulate the press of a button?

吃可爱长大的小学妹 提交于 2019-12-19 19:44:23
问题 I want to test some forms. Is there a way to simulate the press of an Ok (or Cancel) button so that the button is pressed and fires the event handlers that are associated with it? 回答1: The cleanest approach is to call the Click method of the button. This is better than the alternatives for these reasons: You could read the OnClick property, check that it was not nil, and then call the method. But that seems rather pointless since the Click method already does just that. There's no point