Hi i'm a really noob, but i learn programming and after structured programming with Pascal language, i'm beginning to learn about OOP with Delphi.
So, i don't really understand the difference between the 'strict private' instruction and the 'protected' one.. So here is my code, it's about a "bag" creation, it's just the introduction of ...
Hi,
I've got some memories leak related to TidHTTP when it's waiting for the response of a server after a GET and that the thread is being terminated.
Example :
aThread = class(TThread)
private
FidHTTP :TidHTTP;
FCommand :String;
public
procedure Execute(); override;
constructor Create(aCommand :String); override;...
I am trying to call a procedure in a Delphi DLL from C#. The procedure expects the caller to preallocate and input an array of array of TSomeRecord, of which it will then manipulate the TSomeRecord elements as a means of returning results. So, I need to hand-craft Delphi dynamic arrays of arrays of X.
Now, I have found here that a dynami...
We have a Delphi 6 application that uses a non modal form with in-grid editing. Within the FormClose event we check that the entries are square and prevent closure if they're not.
However, if the user clicks on the main form behind then the original form disappears behind (as you'd expect) but this allows the user to move to a new recor...
I've loaded a XML document, and now I wish to run a XPath query to select a certain subset of the XML. The XML is
<?xml version="1.0"?>
<catalog xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genr...
Good Morning,
I have a unit which I want to use in two different programs, to tell the difference I wanted to Define a symbol and then check that in the unit.
In my DPR for the project I have;
program Project1;
{$Define MYDEF}
uses
Forms,
...
and in my Form1 file I have
procedure TForm1.FormCreate(Sender: TObject);
begin
{...
Hi all,
I want to write a application that writes to all users on a local machine a specified key (eg: i want set the location for IE Favorites for all users to the same folder)
PS
anybody used these functions?
LoadUserProfile
RegOpenCurrentUser
CreateProcessAsUser
...
I have a DataModule with XML and I need do a search...
Unfortunately there are more than 300,000 records and I can't make a loop to check one-by-one.
Is it possible to make a query without using a database?
Is there another solution?
...
Hi! I'm using Delphi 2009 and get some strange errors using the following code segment:
var
Str : AnsiString;
CharPtr : PAnsiChar;
...
CharPtr := PAnsiChar (Str);
ExecuteInBackgroundThread (
procedure
begin
DoSomething (CharPtr);
end);
I'm guessing that the string is destructed when falling out of scope and under some ...
Dear all,
I am starting to learn Delphi. So I decided to write an application like MS Excel from scratch. In a new Form1, I did put a TPageControl component containing only 1 page. In that page, I did put a TAdvStringGrid and a TPanel with some buttons (button1, button2) and a Popup1 menu for defining some actions on the grid, like copy...
In my Delphi (on Windows Xp) program I'd like to check available WiFi networks. Do you have any idea how to do it? Best is probably to use MS WlanScan API function but I did not found an example. Can someone help me?
...
I have create report designs in Rave (Delphi 7). However they are in portrait mode. When user selects landscape printing from Print Setup, it is printer in portrait again anyway. How can I fix it, so that Rave generates reports in a format which user selects during print setup?
...
I wish to debug executables for which I have no code, using the Delphi Debugger.
WinDBG and other debuggers are no option in this case, as the given executables all call into my DLL, for which I do have code, obviously. My ultimate goal is, to see a stack-trace right down into the functions of the running executable.
I do have symbol-...
how can I embed reporman in a delphi app
thanks
...
Question:
Are there Windows API calls (perhaps NTFS only) which allows one to split a very large file into many others without actually copying any data (in other words, specify the logical breakpoints between joined files, with file names and sizes)?
Examples: SetFileValidData, NtSetInformationFile
Scenario:
I need to programatically...
Hi All.
1) How can I enable using visual themes in Outlook 2007 addin created in Delphi 7 (using forms)? In Outlook 2003 I create Outlook.exe.manifest, but Outlook 2007 crashed (tested only on Windows Vista) on startup (missing library MSVCR80.DLL).
2) How can I create separator item to menubar? (creating button is App.ActiveExplorer.C...
Is there a way to find which page orientation (poLandscape or poPortrait) user selects furing preview setup? I have tried this code:
if RvSystem1.SystemPrinter.Orientation=poPortrait then
ShowMessage('Portrait')
else
ShowMessage('Landscape');
But this code give "Portrait" even if I select Landscape from setup. Can anybody help?
...
In order to take a screenshot of a specific window, I need to place a white colored TForm behind that window. What Windows API could I use to change the z-order of my window and place it correctly ?
...
When running a Delphi application outside the debugger most exceptions that occur seem to be silently ignored (like an access violation). Sometimes however there appears the Windows error reporting dialog (send or not send, you probably know what I mean). What exactly does this mean? What errors trigger this behaviour?
Additional info: ...
Hi,
I have a few const arrays of the same base type but different sizes, and I need to point to them in the const records. The code below compiles successfully, but finishes with error.
type
Toffsets = array of integer;
Trec = record
point1: Tpoint; //complete size
point2: Tpoint;
aOf...