delphi-7

How to remove focus from currently focused component?

I have a DB component which DataLink.UpdateRecord is called when it receives CM_EXIT message. This message is sent when it loses focus. When I click post button, it doesn't lose focus and value is not written to datasource. How can I reach an effect of component losing focus without switching it to other one? ...

Scroll Wheel in Delphi 7 with CodeRush

One casualty of my brief dalliance with Delphi 2010 and subsequent return to using Delphi 7 was my acceptance of the wheel-scrolling behaviour in Delphi 7 with CodeRush installed. The scroll wheel scrolls horizontally in that environment, which I've accepted for all these many years. But it sure was nice to have vertical scrolling whil...

Delphi, VirtualStringTree - classes (objects) instead of records

I need to use a class instead of record for VirtualStringTree node. Should I declare it standard (but in this case - tricky) way like that: PNode = ^TNode; TNode = record obj: TMyObject; end; //.. var fNd: PNode; begin fNd:= vstTree.getNodeData(vstTree.AddChild(nil)); fNd.obj:= TMyObject.Create; //.. or should I use directly TMyOb...

embedded file into delphi exe application (not as a separate file from the appliaction)

i want to embedded a file (any kind of type) to my exe application and be able to extract in the remote to use it, i know how do it by embedded into resource,but i don't want to place the files in the app directory, i want to store all files (like .rec) into my exe, in c# it is possible to store as text file and then read it by FileStr...

Delphi Gecko SDK - did anyone succeeded with that + XULRunner 1.9?

Hi, I did a checkout of d-gecko SDK from sf.net ( http://sourceforge.net/projects/d-gecko/ ). I wanted to try it with Gecko (XULRunner) 1.9, however when running simple application each time I get error in stdcall function, pointing to WebBrowser.Paint line ... My question is - did anyone succeeded to run GeckoSDK Delphi app in XULRunne...

Delphi label and asm weirdness?

I written an asm function in Delphi 7 but it transforms my code to something else: function f(x: Cardinal): Cardinal; register; label err; asm not eax mov edx,eax shr edx, 1 and eax, edx bsf ecx, eax jz err mov eax, 1 shl eax, cl mov edx, eax add edx, edx or eax, edx ret err: xor eax, eax end; // compiled ...

What is the difference between the VarIsEmpty and VarIsEmptyParam functions

Working in Delphi7 just now, I noticed that not only a VarIsEmpty function exists, but also a VarIsEmptyParam. Since the help of Delphi does not give much explanation: VarIsEmptyParam returns true if the given variant represents an unassigned optional parameter. If the variant contains any other value, the function result is...

Is there a way to change the default EXE icon in Delphi

Embarcadero just released a whole bunch of neat looking icons that I'd like to use to make my Delphi 7 and 2009 apps look fancier. Is there a setting (or hack) in those IDEs that lets me change the default exe icon? ...

Delphi - ListView Question

Is there a ListView (ListBox) or similar component that allows me to easily drop another component in a specific column. (Multiple columns)? Like a checkbox, button or drop down list or all the above. (It would be nice to be able to sort via the header also) If not does anyone know of a resource on how to custom draw something like thi...

Frac function losing precision.

I have a TDateTime variable which is assigned a value at runtime of 40510.416667. When I extract the time to a TTime type variable using the Frac function, it sets it to 0.41666666666. Why has it changed the precision of the value and is there a workround to retain the precision from the original value ie. to set it to 0.416667. ...

Does TWebBrowser updates with IE?

I use TwebBrowser in a D7 app. The question is: When I upgrade my IE this component will use the new IE to render the pages? ...

Setting Line Colour In TChart

How can I change the colour of a line in a TChart in Delphi at run time? For example, how would I change the colour of: Chart1.Series[a]. ...

Why can't pass Marshaled interface as integer(or pointer)

I passed ref of interface from Visio Add-ins to MyCOMServer (http://stackoverflow.com/questions/2455183/interface-marshalling-in-delphi).I have to pass interface as pointer in internals method of MyCOMServer. I try to pass interface to internal method as pointer of interface, but after back cast when i try call method of interface I ge...

Delphi 7 inheritance

Have 6 forms, 1 Base and 5 inherited.The Base has the following snippet: procedure TMechan.Open1Click(Sender: TObject); begin if OpenDialog1.Execute then Form1.Memo1.Lines.LoadFromFile(OpenDialog1.FileName ); CopyCylMemoToRecord; ShowMechanicalValues; end; Since this snippet is in the Base it's also inherited by 5 others. P...

Custom Delphi Colours

If i want to set a colour property to something thats non-standard (i.e. not something like clBlack or clRed) how can i do this? Can i set something like hexadecimal colours? ...

Multiple forms in delphi

In my Delphi Project i want to have a 'Settings' button that when clicked, opens a second form (i think this is the correct term, i essentially want a new window to open) for settings. When the user has finished changing the settings on this new form, i want the form to close on a button click. The settings the user types in will also ...

Delphi 7 - which unit declares TProperty?

Sorry to ask something so basic, but I just can't find it. I found some example code which seems to do exactly what I want, but it doesn't include a uses clause. procedure FilterProps(Sender: TObject; Prop: TProperty; var Result: boolean); undeclared indentifier: TProperty ...

Recommendations to read and parse an Fixed Width Text File using Delphi

Wich is the best way to read and parse an Fixed Width Text File using Delphi? exist any component for that? thanks in advance. ...

What is the equivalent of Application.ProcessMessages, Application.Handle and Application.Terminated in a Windows Service application?

Hi, I am new to Writing Windows Service apps and having problems. Written in Delphi, I have written a normal windows application to check and debug the major parts of the code and now have to convert it to an NT Service. My code has to launch a windows application which I do using the following code. function Run_Program : boolean; ...

Writing Script for Delphi 7 IDE

Is Delphi have any ability to write script of IDE actions? I would like On open delphi project execute script opening some unit. How I can do this. ...