I have 50 or 60 records of four or five fields. I need to load the records into RAM (From a CSV file), search on different fields, enumerate, etc. Not a lot of data, not a lot of functionality.
I was all excited to use the new (to me in D2010) TDictionary or TList, but thought that a TClientDataset (which I've never used before) might ...
Climbing the learning mountain of TVirtualTreeView, I'm attempting to create a custom descendant that ensures that, when the control is resized, the width of the last column exactly fills control's width without requiring a horizontal scroll bar.
I see a number of items (a method and a number of events) pertaining to "AutoFitColumns", b...
I'm using Delphi 4.
I have a main form with a button that dynamically creates a new form.
I'd like the new form to be visible, but to show up BEHIND the main form.
I've tried calling SendToBack() immediately after FormCreate(). But that makes the window flicker quickly before it's actually sent to back.
I've tried making the form invis...
I want to check a file has a valid IMAGE_DOS_SIGNATURE (MZ)
function isMZ(FileName : String) : boolean;
var
Signature: Word;
fexe: TFileStream;
begin
result:=false;
try
fexe := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone);
fexe.ReadBuffer(Signature, SizeOf(Signature));
if Signature = $5A4D { 'MZ' } then
result:=...
I have an app that opens a non-modal form from the main form. The non-modal form has a TMemo on it. The main form menu uses "space" as one of its accelerator characters.
When the non-modal form is open and the memo has focus, every time I try to enter a space into the memo on the non-modal form, the main form event for the "space" sho...
I have a choice.
I have a number of already ordered strings that I need to store and access. It looks like I can choose between using:
A TStringList
A Dynamic Array of strings, and
A Linked List of strings (singly linked)
and Alan in his comment suggested I also add to the choices:
TList<string>
In what circumstances is each of the...
Hi,
I created several new objects
TMyMemo = class (TMemo)
private
FYahoo = Integer;
procedure SetYahoo(Value:integer)
public
procedure Google(A,B:integer; S:string);
published
property Yahoo:integer read FYahoo write SetYahoo;
end;
TMyPaintbox = class (TPaintbox)
private
FYahoo = Integer;
procedure SetYahoo(Value:integer)...
We have a webpage that works fine on the local computer as it uses a COM Object that is only available in the local computer.
the program generates HTML code:
<html>
<head>
<script type="text/javascript">
<!--
function ResizeControl(){Y = document.body.clientHeight;if (Y < 1) {Y = 1}X = document.body.clientWidth;if (...
I have a database table. There is a field name "Sequence" that indicate sequence when user presents the rows in report or grid visually.
When the rows are retrieved and presented in a grid, there are few UI gadget that allow user to reorder the rows arbitrary. The new sequence will be persist in database table when user commit the cha...
I do have a TPageControl that I do add and remove TTabsheet's from, and in the TTabsheets there are 2 TEdit's that the user can type firstname and lastname, when they do the Tab Caption does show what they have written.
But if the user add a '&' somewhere in the TEdit (and they are allowed to do) the tab do get the char after '&' as (un...
Hi,
I get SOMETIMES error message: EReadError with message 'Property PageNr does Not exist', when I try to run my own project. I am really desperate, because I see simply nothing what is the cause. The devilish is that it comes up sometimes but often. It concerns of my own component TPage. Here is declaration>
TPage = class(TCustomCont...
Hi
My application has many many mdi forms and they are created after successfull user login. How can I best hide this creation process? It looks stupid and it takes longer time while mdi forms are painted after new form is created and so on.
So far I have used LockWindowUpdate, which doesn't hide everything, but I would like to use a s...
I have an interface:
type IXMLSerializable = interface
function SaveToXML : DOMString;
function SaveToXMLDocument : IXMLDocument;
procedure LoadFromXML(AXML : DOMString);
end;
It is used to serialize some settings of forms or frames to xml.
Simple implementation:
SaveToXMLDocument:
function TSomething.SaveToXMLDocument: IXMLD...
I have this code that sends just one attachment by time, how can I adjust this code to send 1-2 attachments?
function SendMailMAPI(const Subject, Body, FileName, SenderName, SenderEMail,
RecepientName, RecepientEMail: String) : Integer;
var
message: TMapiMessage;
lpSender,
lpRecepient: TMapiRecipDesc;
FileAttac...
To describe this issue, the best would that you would test my application with following usecase:
Application: http://ubuntuone.com/p/nF/
Open application;
Click on the ">" captioned button;
Click on same button again;
Click on the same button again.
As you can see - URL is correctly detected in first expanding, but in any further ...
1.) I can create a simple application which has one routine called
function ConnectToDB: Boolean
and run it from my virtual directory (wwwroot/cgi-bin) and it connects and reports back connected .
2.) I can create a simple web service helloWorld
function helloWorld: String;stdcall;
I can create a client and call my web service ca...
For example, what Wordpad did when I press "Ctrl+C"?
It places many different format to clipboard. So Notepad can get the text without any color or font...etc, and you still can keep the original format when you paste in another Wordpad window.
The MSDN said I should call SetClipboardData multiple times. But it doesn't work at all.
...
I have an application that can load various graphical file formats such as bmp, jpg, png, emf, etc... and render them onto the screen for previewing.
I am using Delphi 7. I have just been introduced to the EMF+ file format that was created around the time of Windows XP that is created utilizing the GDIPlus.dll. I can open the EMF+ file...
The following code will log in my application to a server. That server will return an authentication token if the login is successful. I need to use that token to query the server for information.
egressMsg := pchar('email='+LabeledEdit1.text+'&&password='+MaskEdit1.Text+#0);
egressMsg64 := pchar(Encode64(egressMsg));
Reserved :=...
I'm getting a lot of error messages, as well as slow performance. ... Is there a workaround? (I heard Delphi 2007 does not work inside VirtualBox.)
...