delphi-xe7 Questions

3

Solved

I have a bug report showing an EEncodingError. The log points to TFile.AppendAllText. I call TFile.AppendAllText is this procedure of mine: procedure WriteToFile(CONST FileName: string; CONST uStr...
Augmentative asked 29/2, 2016 at 20:18

3

I'm using Delphi XE7 for developing windows 32 bit application. My application contains many units, which has an initialization section. I need to initialize one particular initialization section...
Coleslaw asked 30/8, 2018 at 18:36

4

In Delphi XE7, I use this trick to automatically enable or disable a toolbar button ("Edit ListView Item") according to whether an item in the ListView is selected or not, to prevent the user to cl...
Durgy asked 1/3, 2015 at 10:57

2

Solved

I use VirtualStringTree (VST) to display data that is grouped, header-details. I need to have an option to allow user to expand, collapse headers to see details and in some cases I need to show dat...
Oversize asked 10/3, 2016 at 16:42

2

Solved

When testing StrUtils.SearchBuf with [soWholeWord,soDown] option, some unexpected results occurred. program Project1; Uses SysUtils,StrUtils; function WordFound(aString,searchString: String): ...
Phyllome asked 16/9, 2014 at 20:36

3

Solved

I have a function that converts TBitmap (which I draw) to TPngImage and then saves it to stream, so other methods can use it. Png is used because it creates smaller images for report output (excel,...
Furfuran asked 6/8, 2015 at 16:38

3

Using the following code to make a borderless form resizable works great: type TForm1 = class(TForm) protected procedure CreateParams(var Params: TCreateParams); override; end; procedure TFor...
Crotchet asked 24/6, 2016 at 23:46

2

Solved

I have a .hlp file that goes with the application. Because the functionality has not changed since I last wrote the app the hlp (written in 2003) is still valid. However when I compile the app in D...
Ritzy asked 6/7, 2016 at 16:55

3

Solved

I have a TDBGrid called myDbGrid that I want to update after a change to the database (insert/update/delete). How can I do this without reloading my form completely? myDbGrid uses myDataSource and...
Fifield asked 19/2, 2015 at 16:29

2

Solved

I have 100000 lines in a TMemo. I want to do something like: for i:= 0 to Memo.Lines.Count-1 do Memo.Lines[i]:= SomeTrim(Memo.Lines[i]); but the speed is 0.5 lines per second!! After adding B...
Osbert asked 28/10, 2017 at 14:46

2

I create a modal form in which the user can set a (vcf) style. I use this code: procedure TfrmMain.btnChangeSkinClick(Sender: TObject); begin frmSkins:= TfrmSkins.Create(NIL); frmSkins.ShowModa...
Doggoned asked 19/5, 2015 at 14:46

2

Solved

In my application there is a TEdit with PasswordChar = '*'. When the user presses Ctrl + C a hint appears. Translated: Not Allowed You cannot copy text from a password field. And obvio...
Magdeburg asked 27/2, 2020 at 6:45

1

In the project directory settings, I often need to use the project name, say 'MyProject', as part of the output paths. I would prefer to avoid hardcoding the project name in the settings. Is th...
Spermophile asked 19/10, 2019 at 7:12

3

Problem Definition I am trying to create a custom bitmap brush with transparency but it doesn't seem to be working as expected. If you look at this example. Add the code and hook up the paint, cre...
Bigler asked 17/7, 2015 at 1:20

3

Solved

I have a string var 'HTMLCode' that contains HTML code. I want to load this code into the browser. This is Embarcadero's code: procedure THTMLEdit.EditText(CONST HTMLCode: string); {VAR Doc: IHT...
Concertina asked 29/9, 2016 at 14:26

1

Solved

Why this code does not crash? T is nil. How it is possible to access Caption if T is nil? procedure Crash; VAR T: TButton; begin T:= NIL; T.Caption:= ''; <---------- this works end;
Annora asked 3/7, 2018 at 18:50

3

Solved

I am using Indy IDFTP to make a directory. I need to find a reliable way to determine if a directory exists and if it does not exist, to call MakeDir. I have tried the following code but an excepti...
Minier asked 15/1, 2015 at 0:50

4

I am trying to modify my Delphi 2010 code to compile in XE7 (and want to retain the ability to compile it in 2010). So in the unit that houses my mainform I added conditional directives. The follow...
Symmetry asked 1/10, 2014 at 23:31

8

Solved

In Delphi 2009, SysUtils.pas contains this in line 425: EProgrammerNotFound = class(Exception); Is this simply an easter egg or something serious? When should this exception be raised? Does it ...
Cronin asked 18/1, 2010 at 5:49

1

Sometimes my program freezes. If i click 'Pause program' it shows me this: ntdll.RtlUserThreadStart: 773301C4 89442404 mov [esp+$04],eax 773301C8 895C2408 mov [esp+$08],ebx 773301CC E9E9960200 jmp...
Seagoing asked 6/2, 2017 at 11:36

2

I am using RAD XE7. In my Delphi application I want to set default values for fields of Records. I tried following code, but it does not compile, I know it is wrong. I there any another way? TDt...
Antenna asked 16/10, 2017 at 6:6

3

How can you reset the max width for a PopupMenu's items list? Say i.e you add a few TMenuItems at runtime to a popupmenu: item1: [xxxxxxxxxxxxxxxxxxx] item2: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] ...
Pants asked 18/10, 2014 at 2:41

1

Solved

I was comparing performances between these two ways of initializing a dynamic array: Arr := TArray<integer>.Create(1, 2, 3, 4, 5); and SetLength(Arr, 5); Arr[0] := 1; Arr[1] := 2; Arr[2] ...
Sackman asked 20/8, 2017 at 19:13

3

Solved

I want to create a splash screen (before the main form) that will be shown for x seconds but I don't want to delay the creation of the main form with x seconds. So, I create the splash screen form...
Montenegro asked 10/8, 2017 at 10:27

1

I have found all kind of examples about how to make TWebBrowser use a proxy (like 202.8.128.5:8080). However all those examples are changing the proxy globally for all running instances of TWebBro...
Swivet asked 25/2, 2015 at 11:7

© 2022 - 2025 — McMap. All rights reserved.