vcl

How to perform an image stream preview to a Delphi 6 frame or form from a background thread efficiently?

微笑、不失礼 提交于 2020-01-14 12:37:12
问题 I have a Delphi 6 application that receives and processes an image stream from an external camera. I have the code on a background thread since it is CPU heavy and I don't want it interfering with with the user interface code that runs on the main thread. I want to update a rectangular area on a form or frame with the TBitmaps I create from the camera's JPEG frames that are received at a rate of 25 frames per second. I want to know what method will give me the best performance and what

How to perform an image stream preview to a Delphi 6 frame or form from a background thread efficiently?

痞子三分冷 提交于 2020-01-14 12:36:23
问题 I have a Delphi 6 application that receives and processes an image stream from an external camera. I have the code on a background thread since it is CPU heavy and I don't want it interfering with with the user interface code that runs on the main thread. I want to update a rectangular area on a form or frame with the TBitmaps I create from the camera's JPEG frames that are received at a rate of 25 frames per second. I want to know what method will give me the best performance and what

Delphi TFloatField.DisplayFormat for numeric fields less than 1.0

大城市里の小女人 提交于 2020-01-11 06:13:29
问题 This is my procedure. procedure format_integer_field(Atable: TDataSet); var i: integer; begin if Atable.Active then if Atable.FieldCount > 0 then with Atable do begin for i:= 0 to FieldCount-1 do if (Fields[i] is TIntegerField) then begin (Fields[i] as TIntegerField).DisplayFormat := '###,###'; (Fields[i] as TIntegerField).EditFormat := '#'; end else if (Fields[i] is TFloatField) then begin (Fields[i] as TFloatField).DisplayFormat := '###,###.##'; (Fields[i] as TFloatField).EditFormat := '#.#

Non-english text size too small in windows 7

て烟熏妆下的殇ゞ 提交于 2020-01-06 04:01:09
问题 I am trying to display the current date in Nepali language. I have declared constant string for the caption. It renders the text pretty fine on windows 8.1 but the same text is displayed too small in windows 7. Adjusting the font size also doesn't help much as it should. Things I tried Installed Nepali language pack for windows 7 Installed several Unicode fonts like arial unicode ms, segoe ui, microsoft neo gothic and others The source code has been saved as UTF-8 encoding But the problem

C++Builder VCL array of buttons dynamically made each with his independent click action

烂漫一生 提交于 2020-01-05 10:22:05
问题 i have tried the following way but it doesn't seem to work and it is incomplete. void __fastcall TForm1::Button1Click(TObject *Sender) { TButton **ButtonArray = NULL; ButtonArray = new TButton*[5]; for(int x = 0; x < 5; ++x) { ButtonArray[x] = new TButton(this); ButtonArray[x]->Caption = (AnsiString)"teste " + x + " - " + (1+random(100)); ButtonArray[x]->Left = 25 + 4 * random(100); ButtonArray[x]->Top = 25 + 4 * random(100); } } Code compiles without problems, but no button seems to show.

Only One CheckBox Checked at a time

最后都变了- 提交于 2020-01-05 09:23:41
问题 [Compiler: Delphi XE2] I have spent all day yesterday trying all sorts of ways to accomplish this specific task but they have all ended in the same result. Using TRZCheckGroup and this example to see what has been checked ect.. procedure TFrmMain.cbOptionsChange(Sender: TObject; Index: Integer; NewState: TCheckBoxState); var ItmIndex0, ItmIndex1: Integer; begin { Initialize ItemIndex's } ItmIndex0 := -1; ItmIndex1 := -1; { Return the position Index of the string's(0 and 1) } ItmIndex0 :=

Only One CheckBox Checked at a time

廉价感情. 提交于 2020-01-05 09:22:43
问题 [Compiler: Delphi XE2] I have spent all day yesterday trying all sorts of ways to accomplish this specific task but they have all ended in the same result. Using TRZCheckGroup and this example to see what has been checked ect.. procedure TFrmMain.cbOptionsChange(Sender: TObject; Index: Integer; NewState: TCheckBoxState); var ItmIndex0, ItmIndex1: Integer; begin { Initialize ItemIndex's } ItmIndex0 := -1; ItmIndex1 := -1; { Return the position Index of the string's(0 and 1) } ItmIndex0 :=

delphi component property: TObjectList<TPicture>

吃可爱长大的小学妹 提交于 2020-01-05 04:16:22
问题 I'm trying to create a VCL component, that lets you insert multiple TImages of different sizes as properties. I was told to best use a TObjectList ( Delphi component with a variable amount of TPictures ), but now I'm struggling to make the single TPictures assignable in the Property editor . What i have at the moment: (it compiles) unit ImageMultiStates; interface uses Vcl.Graphics, Vcl.StdCtrls, System.SysUtils, System.Classes, Vcl.Controls, Vcl.ExtCtrls, Forms, Generics.Collections; type

Set method of TPicture property doesn't get called when the form is created

我的未来我决定 提交于 2020-01-04 14:13:01
问题 Here's my component overall structure: My Component property Categories: TCollection (of TCategory) TCategory property Icon: TPicture read FIcon write SetIcon; property Example: Integer read FExample write SetExample; (Other category properties...) (Other properties...) In the Object Inspector of the IDE, I choose a picture and it gets serialized successfully (I checked it in form view as text). I set a breakpoint on SetIcon method and when I compile and run the application, it doesn't get

Assign values to multiple edit boxes, given their names

旧街凉风 提交于 2020-01-03 20:57:19
问题 i am currently doing some programming in Borland C++ Builder 6. I have 24 edit boxes(a visual component, with a text field) and i want to insert some values in the boxes, now i do it like this: Edit1->Text=1; Edit2->Text=2; Edit3->Text=3; ... Edit24->Text=24; but i want to have something like this: for(int i=1; i<25;i++){ Edit"i"->Text=i; } i think i have to make an array of objects or something. Can any body help me with this? I don't have a lot of experience with objects and stuff like that