delphi

How to check if a exe is accessed from the server

This is a client server application. I'm creating a update program that will replace a list of exe files, run scripts, and anything else that needs to be updated. This will be installed on the server. First I need to check if the executable file is opened via a network share. I can do this manually by going into Computer Management ...

With what delphi Code should I replace my calls to deprecated TThread method Suspend?

It has been asked before, but without a full answer. This is to do with the so called famous "‘Fatal threading model!’". I need to replace this call to TThread.Suspend with something safe, that returns when terminated or resumed: procedure TMyThread.Execute; begin while (not Terminated) do begin if PendingOffline then begin ...

Are there issues with running the Delphi 2007 and Delphi 2010 IDEs on Windows 7?

The Windows Upgrade Advisor has told me there are 'known' issues with running Delphi 2010 on Windows 7, but I can't find them, does anyone know if there are, or if they've been fixed already? ...

Delphi - how to skin a form

hi all I just finish reading delphi-skinning-libraries and sptbxtoolbar-skin-change but this is not what I wanted. I'm interested in how to apply a skin on a form, just like the classic WinAmp windows :) Any aricle or code or ideea is welcomed. I just found Windows XP Theme Manager, i'm at work now, so i'll study it at home (I hope thi...

Best website for free VCL components?

I am just getting back into C++ Bulder after several years. What's currently the best web-site for free VCL components? ...

Delphi loop speed question

Is there a faster way? I basically need to add AA-ZZ to thousands of records at a time. Just a list of 35 items takes quite a while to complete muchless a list of a thousand. procedure Tmainform.btnSeederClick(Sender: TObject); var ch,ch2:char; i:integer; slist1, slist2:TStrings; begin slist1:= TStringList.Create; slist2:...

Virtual StringTree: How to determine if the node text is completely shown?

Hi, When TVirtualStreeTree.HintMode = hmTooltip, the node text will become the hint text when the mouse is hovered over a node and column where the node text is not completely shown. But I have to set HintMode = hmHint, so that I can in the even handler supply various hint text based on the position the current mouse cursor is, and in th...

Is a Transaction active when a IBQuery component is active

When opening a TIBQuery (IBQuery.Open), is the correspondig Transaction active only the time the data is fetched from the DB or as long as IBQuery is closed? ...

Namespaces in Delphi

Are there any practical benefits in using long unit file names like MyLib.MyUtils.pas or it is just a kind of unit name prefix? ...

Delphi equivalent of utoa from C

Is there a Delphi equivalent of the C utoa function, that allows me to provide a radix? I'm using Delphi 2007, and have to read a file which has been named using a radix of 32 with utoa. I'd rather not re-invent the wheel and introduce my own bugs. [Edit:] It would operate the same way that IntToStr operates, which uses base 10 so the eq...

how to tell when an external application ends in delphi

Hi I am using ShellExecute to run external application How can i tell when the external application ends ? Here my code theProgram := 'MySql.exe'; itsParameters := ' -u user1 -ppassword -e "create database abc"’; rslt := ShellExecute(0, 'open', pChar (theProgram), pChar (itsParam...

Kill child process from main app

I have a Delphi server that run python scripts in the background (they run similar to "python Sync.py **params**"). This scripts can do things like connect to external servers, open ssh connections and scary stuff where they can hang. I need to detect if they hang, and kill it. Also, if the server is closed, and want to kill the proces...

Why doesn't TApplicationEvents.OnIdle get called?

Hi, in my app I have a main form with a button. Clicking this button, a form (not auto-created in dpr) is created and displayed; on this form, I placed a TApplicationEvents component and I defined its OnIdle event handler. This event handler doesn't get called! May this depend because I derived this second form not from TForm but from an...

Code128/EAN128 barcode component for Fast Report?

During a migration of reports which contain EAN128 / Code128 barcodes to Fast Report I found that Fast Report does not use the correct symbology. The lines of a Code128 barcode are very wide so that they are perfect for long distance scanning in a warehouse. I reported it, but only received a recommendation for a third-party barcode libr...

Is Delphi a good language to learn?

About 10 years ago I bought Borland Delphi, as a child I thought it was the coolest thing ever but I never really got into it. Sometime I see post on SO with a Delphi tag so people must actually still use it. I am curious how does it compare to something like C#? Can it basicly accomplish the same results? ...

Windows 7 style Notifications Flyouts in Delphi

Regarding Notification Area recommendations by Microsoft, I'm looking for ideas or a Delphi component to implement Notification Area Flyouts. The first "natural" idea is to use a standard Delphi form, but I'm facing two issues with it: I can't get the form border behavior using the standard "BorderStyle" property. Tried to "mimic" ...

Optimal way to store datetime values in SQLite database (Delphi)

I will be storing datetime values in an SQLite database (using Delphi and the DISqlite library). The nature of the db is such that it will never need to be transferred between computers or systems, so interoperability is not a constraint. My focus instead is on reading speed. The datetime field will be indexed and I will be searching on ...

What is Delphi Prism LineFeed

What is the equivalent of C#'s \n and Visual Basic's vbCRLF or vbNewLine in Delphi Prism? Do I have to use Environment.NewLine? ...

TIBQuery.Unidirectional = True. How can I rewrite code ?

I have many methods in legacy code that use a TIBQuery (Interbase) with Unidirectional property = False. The problem is that users sometimes get out of memory exception. I suspect it could be fixed by setting this property to True as there is no need to cache the records. Of course I don't want to broke the old code but I also want to f...

TStringGrid - is there a simple way to get the "current/selected" row?

I can go the long way round, loop over each row, get a TRect from CellRect(col, row), then query its State for gdSelected ... But isn't there a quicker way to get the row number of the currently selected row, if any? ...