Questions tagged [delphi-7]
Delphi 7, released in August 2002, is a version of Delphi for Windows 32 bit.
3,046
questions
-3
votes
0
answers
85
views
TMemIniFile.ReadString causes intermittant crashes [closed]
I am using Delphi 7 on a Windows 10 machine.
I have a Unit that contains a TFrame class that is a StringGrid replacement.
I use a TMemIniFile for reading programs settings.
If the program is ran ...
-2
votes
1
answer
52
views
'PAnsiChar' and 'array (Write in delphi7) i use now Delphi 10 [closed]
I'm having a problem with my file, it was written in Delphi 7, and it's incompatible with Delphi 10.
procedure RunApp(Path: string);
var
p1, p2: array[0..100] of Char;
w1: cardinal;
begin
ChDir(...
0
votes
1
answer
99
views
Dataset Locate number within range
I have this dataset with the following data :
Winner Name
Coupon Start
Coupon End
Joshua
00001
00010
Mark
00011
00020
Stephen
00021
00024
Ina
00025
00025
I can easily using Locate to find for ...
-1
votes
2
answers
45
views
How to compile a Delphi source code file for execution from the command line with parameters?
I use Delphi 7 IDE. I want to run .exe from the command line with parameters (to be defined).
How can I know if my app is running with the CMD command?
How can I read the parameter with source code?
0
votes
1
answer
37
views
D7 - How to decode in a PDF file a string encoded in Base64 extracted from an XML file?
I work in a D7 environment using Indy 10.0.52 components on Win10.
I receive XML files that contain attached files, encoded in Base64, in the <Attachment> element.
The files are extracted using ...
-2
votes
1
answer
125
views
Borland Delphi 5 and 7: exceptions stop to work
I faced very strange behavior: after some point in the code exceptions stop to work. This is my test function:
procedure vmDbg_TestExceptionsHandling(AMarker: string);
var
i: integer;
begin
i := ...
0
votes
0
answers
92
views
When using "Trace Into" in Delphi Community edition, it does not show properties in the Object Inspector
I'm using Delphi Community edition 10.4 and I'm trying to find an error in my code. I have used Delphi 7 where if you use "Trace Into" it helps you find your error.
When using the Community ...
0
votes
0
answers
36
views
thishquery dose not contain member named CreateBlobStream error in delphi [duplicate]
i need to save and display images in Sql db, I succeeded but not to save imageges,
i try a few ways to do it but get errors,
this is one:
procedure TfrmSingatureByYear.btnSingatureClick(Sender: ...
0
votes
0
answers
79
views
What is a good way to create a device context for creating a TMetaFileCanvas?
I make documents by using a TMetaFile and drawing on the TMetaFileCanvas.
I used to use:
MetaFileCanvas := TMetaFileCanvas.Create(MetaFile, 0); // the 0 uses your screen as device context.
This ...
0
votes
0
answers
66
views
Override IDE keyboard shortcuts at design-time
I'm trying to create some productivity tools for other developers that use the Borland Delphi 7.0 IDE, to create some complex forms, but I'm hitting a wall every time I want to add a new keyboard ...
1
vote
2
answers
259
views
Delphi - check if a Unicode character occurs in a set of characters?
This code works good with Delphi-7 (until Delphi had Unicode support):
Value := edit1.Text[1];
if Value in ['м', 'ж'] then ...
'м', 'ж' - cyrillic symbols
But this construction doesn't work with ...
0
votes
0
answers
53
views
How can I show a message when clicking the print button on fastreport?
I want to show a message when the fastreport print button is clicked.
How can I write down a code from delphi?
Should I use "OnBeforePrint" or "OnAfterPrint"?
0
votes
0
answers
110
views
Is it possible to add a new calendar type to Windows 7 date system?
I want to add a custom calendar to Windows 7's calendar type list, but I don't know how!
When you change regional settings (in "Region and Language" window, "Formats" tab, "...
2
votes
2
answers
263
views
How to make Tpopupmenu to pre-select the 1st menu entry when a popup is opened with the keyboard
The items in TPopupMenu can be highlighted/selected with keyboard or mouse. When selected with keyboard, you can move in the menu with the arrow keys.
How to mark the 1st menu item as selected (blue) ...
-1
votes
1
answer
153
views
Indy error in Delphi 7: Undeclared identifier: 'hoWantProtocolErrorContent'
When using TIdHTTP to send GET commands with JSON variables, sometimes the server returns me the error below:
HTTP/1.1 500 Internal Server Error
Using Insomnia for testing JSON results, I see an ...
1
vote
1
answer
92
views
How to remove OPEN AS READ ONLY button feature from the TOpenFileName dialog
When I call this File dialog it displays a nice modern dialog with
OPEN + OPEN AS READONLY buttons.
How can I remove the OPEN AS READ-ONLY button feature?
OpenSaveFileDialog(editform,'','my|*.my','','...
0
votes
0
answers
58
views
How to allow end-user to toggle TaskBar Button visibility on/off run-time without a tiny orphan TApplication window appearing
My background application allows end-users to choose their GUI to be either the TaskBar Button or SysTray icon. (I know advanced users here prefer SysTray, but we also offer for novice users an ...
0
votes
2
answers
105
views
Highlight word in TListView Delphi 7
I'm trying to highlight a word from TListView but I can't make it work. My first attempt is to highlight the first letter of each row but won't work. TListView won't display anything. Here is my code:
...
1
vote
1
answer
85
views
Sometimes Common-Controls are missing from the form run-time (Tbutton, Radio, checkbox, etc) when D7 exe has the manifest file
The missing buttons appear back on screen when I move a mouse over them or invalidate/repaint the whole form by code. I have made a fix that if ALT-key is pressed (to show shortcuts) these are ...
0
votes
0
answers
113
views
How to detect that Taskbar Thumbnail Preview is being drawn when DWMWA_HAS_ICONIC_BITMAP is set
How to detect that Taskbar Thumbnail Preview is being drawn (because user is moving mouse over taskbar button) or is currently appearing on screen?
Why the code below does not make log entries when ...
0
votes
2
answers
108
views
How to make a popup appear on the exact location of App's TASKBAR Button
I am currently popping up a popup near the SysTray icons when Application.OnActivate occurs.
however I need to popup it now where the App button was clicked on TaskBar (next to start menu).
How to ...
0
votes
0
answers
146
views
Unable to get the caret position from Outlook/Chrome/Edge, this code OK with most Apps
I am unable to get the caret position from Outlook/Chrome/Edge while this code works OK with other Apps e.g. FireFox, Word, Excel.. Is it a some kind of security feature of browsers etc, any solutions?...
0
votes
1
answer
177
views
UTF8Encode different result on different systems (UTF8Decode)
I ran into an interesting anomaly. I receive a WideString text via RPC, which I need to convert to ANSIString and check the signature in the text against the hash of the text.
On English based Windows ...
0
votes
1
answer
218
views
How to show icon always in taskbar when there is no visible form available
I have a systray application without any taskbar icon. Nowdays most systray icons are hidden and I want to make an easier access to app.
There are no forms created with Application.FormCreate so ...
0
votes
2
answers
340
views
Using Modern IFileDialog Open/Save dialog with Delphi 7 apps under Win10/11
I would like to modernize the GUI of my Delphi 7 App, I have already .manifest file and it looks quite good, but the Fileopen dialogs are terrible. How the make them modern?
I am using this code at ...
0
votes
1
answer
121
views
Showing an animated .ani cursor on a form in Delphi 7
My application is loading list items from a database in the background with a separate thread. During the loading process the user can interact with the application, so I don't want to change the ...
1
vote
0
answers
298
views
How to get S.M.A.R.T. information from USB devices?
I have 2 drives in my computer and 1 drive attached via USB.
When I use this code I correctly get 3 devices:
function TForm1.GetHDDCount: integer;
var f, i: integer;
begin
Result := 0;
for i:=0 ...
0
votes
1
answer
51
views
How to get S.M.A.R.T. info from disks?
I tried code found in Google but nothing works and in most cases it doesn't even compile (missing units, undeclared data types etc).
I finally found something that looks complete but shows "The ...
0
votes
1
answer
166
views
Python code to Delphi 7 conversion: endianess
I am trying to convert this code to Delphi 7. In Python it converts hex bytes to big endian:
keydata=[0,0,0,0,0,0,0,0]
for i in range(0,len(data),4):
Keydata[i//4]=unpack(">I",data[i:i+4]...
0
votes
1
answer
146
views
Why the destructor of TTreeNode is called BEFORE parent TTreeview destructor?
Deeply apologize, I try hard, but I can not find any plausible explanation.
There is my own TMyTreeNode class:
TMyTreeNode = class (TTreeNode)
private
FFont:TFont;
FBrush:TBrush;
public
...
-1
votes
1
answer
57
views
How to capture an event, when TTreeview structure changes?
I am making descendant of TTreeview and I want to implement an event in the case, when the TTreeview structure changes. For example, one TTreeNode is moved from one position to another, or it becomes ...
0
votes
2
answers
74
views
How can I load Field1 and Field2 from TADOQuery to TTreeView?
I want information from TADOQuery to be loaded into a TTreeView. For example, I want it to be loaded as Field1->Add in Table1 and as Field2->AddChild with buttonClick. But when I run the code, I ...
0
votes
0
answers
33
views
HttpSendRequest takes 10sec to get the response in my customer's PC, but works well in mine about 2sec
It's a Https Post:
In some PC, the API HttpSendRequest works well, but sometimes it's going to take about 10s to get the response. I coded it in Delphi, and the same thing happens in c# code.
I ...
1
vote
0
answers
255
views
Embedding an. exe inside a delphi project [closed]
I have a Delphi 7 legacy project. I want to embed a proprietary .exe from a company. The company wants me to hide the .exe so that the proprietary .exe cannot be used anywhere else.
Let me know if ...
1
vote
1
answer
69
views
TIB_Script run large script
I encountered a problem that IB_Script returned an error while running a longer script:
SQL Error Code = -104
Unexpected end of command - line 18, column 52
As long as the number of characters in ...
0
votes
1
answer
156
views
How can I print a Code-128 barcode with a TOposPosPrinter control?
Please help!
I am trying to print a Code-128 barcode with the TOposPosPrinter control from CRM/RCS-Dayton.
While I do not have any problems to print plain text, printing the logo and cutting the paper,...
0
votes
0
answers
169
views
How to make Circular Delphi Form perfectly rounded from corners also for Win10
Any ideas how to make my app window look perfectly circular, currently the main form is made circular with this code but its not very smooth from the corners even if I don't place any background image ...
0
votes
1
answer
397
views
C# Process.Start opens two instances of the external EXE file
I want to open an external EXE file (written in Delphi), put it on the top and in a specific location of the screen.
This piece of code is used:
ProcessStartInfo psi = new ProcessStartInfo("...
1
vote
2
answers
176
views
How to pass class reference (metaclass) as a parameter in procedure?
There are two objects: TFoo, TFoo2.
There is also a class reference : TFooClass = class of TFoo;
Both are descendants from TPersistent.
They have their own constructors:
type
TFoo = class(...
1
vote
1
answer
534
views
Force Application Window to Foreground from Background (via msg from other process)
I am using this code with Mutex and custom Message to force the 1st instance of application to appear on screen if the user tries to start a 2nd instance. There must be only 1 instance of my app ...
0
votes
0
answers
72
views
Problem changing focus of a dbgrid with the mouse
I'm facing a problem in my application where the user instead of clicking the "enter" to change between cells of a dbgrid is clicking with the mouse... My analysis code about the changes is ...
-1
votes
1
answer
124
views
DBLookUpComboBox does not save the record in the database when selecting with ENTER - Delphi 7
I made this code to search dblookupcombox that is on the screen and select the record with ENTER, it is selecting the record correctly, but it does not save the correct record in the database, it ...
1
vote
1
answer
55
views
Delphi 11: Constant object cannot be passed as var parameter
I am trying to transfer my Delphi 7 code to Delphi 11.
The following code worked fine in Delphi 7, but in Delphi 11 I get a compile-time error
[dcc32 Error] VELOS.PAS(44): E2197 Constant object ...
1
vote
1
answer
364
views
Modernizing the look of Application.Messagebox for Windows 11
Is there a method to modernize how the Application.MessageBox() dialog looks in Win11? Perhaps by creating a manifest file or something to make classic desktop app to look newer?
-4
votes
1
answer
151
views
How can I use an action in the TActionList?
I need to turn the Enabled status to false on an Action that is already in a TActionList.
Also, I don't know the index of the action.
Is there any way to use the Action via its name, or any other ...
0
votes
1
answer
243
views
Delphi 7 stringGrid first row content
In delphi 7, you have a one column stringGrid with no fixed col, whose rowCount is 50 and populate it with 100 items. After playing around with navigation keys, how to find out, by code, which of ...
0
votes
1
answer
329
views
How to print a PDF file from TWebBrowser with a background process?
I have a HTML document in a TWebBrowser. I need to transform this document to a PDF file and send it as attachment in a mail. The way that I found is to print the TWebBrowser content with a PDF ...
0
votes
1
answer
210
views
Display a form while mouse hovers over a Timage component in Delphi
I want to display a form only while the cursor is hovering over a TImage component just like a hint. I am able to use the "OnMouseMove" event to show the form however I am unsure as to how I ...
0
votes
0
answers
166
views
Threaded JPEG decoding using GDI+ randomly triggers "Not enough memory resources are available to process this command"
On a windows 10 system with 16GB ram, my program (which uses under 500mb ram at most) randomly throws "Not enough memory resources are available to process this command" exceptions when ...