delphi-2009

Run Firebird query in a background thread and save result set

 ̄綄美尐妖づ 提交于 2019-12-04 11:57:41
i want to put the execution of a query with parameters into a thread-safe class in delphi-2009. I navigate in google but i don't found just what I wanted. Thanks I have found that most database API's are only thread safe at the connection level. Firebird may be different, but using InterBase several (8+) years ago, it was not thread safe. Update: I have verified Firebird is only thread safe at the connection level. This means that typically you need to avoid using a single connection from more than one thread at the same time. The execution of a query against a given connection applies. Avoid

Recognizing text from a picture in delphi

时光总嘲笑我的痴心妄想 提交于 2019-12-04 11:40:04
问题 i need an advice on how to approach this problem. I have some picture data: *.jpg, *.bmp ... and i need to extract the data from it. The data is alphanumeric text. I work in delphi. 回答1: You will have to head for a OCR (Optical Character Recognition) library. This is a pretty complex procedure, I believe you wouldn't be asking this question if you knew any way to implement this by yourself. A quick Google yielded this result, maybe it's of help for you: http://www.planet-source-code.com/vb

Unicode problems with Delphi 2009 / 2010 and windows API calls

随声附和 提交于 2019-12-04 09:47:29
Hi I have been using this function in Delphi 2006, but now with D2010 it throws an error. I think it is related to the switch to Unicode. Function TWinUtils.GetTempFile(Const Extension: STRING): STRING; Var Buffer: ARRAY [0 .. MAX_PATH] OF char; Begin Repeat GetTempPath(SizeOf(Buffer) - 1, Buffer); GetTempFileName(Buffer, '~~', 0, Buffer); Result := ChangeFileExt(Buffer, Extension); Until not FileExists(Result); End; What should I do to make it work? EDIT I get an 'access violation' when the ChangeFileExt is called Windows.Pas function GetTempFileName(lpPathName, lpPrefixString: PWideChar;

creating a gif animated file in delphi 2009?

泪湿孤枕 提交于 2019-12-04 07:44:08
gif := TgifImage.Create; gif.Width := 100; gif.Height := 100; gif.AnimationSpeed := 500; gif.Animate := true; gif.add(image1.Picture.Bitmap); gif.add(image2.Picture.Bitmap); gif.add(image3.Picture.Bitmap); gif.SaveToFile('gif.gif'); This loops just once and the speed is not 500? How to make it loop and set the speed? Anders Melander, who wrote the original TGIFImage , has the following answer . You need to add a “Netscape Loop” extension block to the first frame of your GIF. The loop block must be the first extension you define for the frame or else it will not work. See the Animate demo for

Forcing a non blocking temporary hint window in Delphi

南笙酒味 提交于 2019-12-04 07:20:18
I've been searching, but cannot find a solution so I figured perhaps I should simply post it. Here's what I'd like to do, in Delphi (2009): At a certain moment in my application, I'd like to show a message to the user. This should be the normal hint window, which automatically disappears after the normal application defined hint pause, with a custom message (and have it automatically sized etc etc). This should be non blocking, like a normal hint, not dependent on the current control or whatever. "Just show the damn message", in the Application hint window and carry on. Any clues? You can use

Debugging OutputDebugString calls in Delphi

筅森魡賤 提交于 2019-12-04 07:04:26
I've some "rogue" OutputDebugString call in my application which prints out "T", but I can't just locate it. Is it possible somehow to set breakpoint on OutputDebugString -function and see where it is called from? I'm using Delphi 2009. How many calls to OutputDebugString are there in your project? You can use the "Find in Files" dialog to find them all, and if they aren't too many, there shouldn't be a problem. Otherwise, you could - of course - use a search and replace and replace all OutputDebugString( with raise Exception.Create( . You could also write a function procedure

Is there a Delphi library which returns all effective source paths for a project?

怎甘沉沦 提交于 2019-12-04 05:05:51
For static code analysis tools, it is necessary to know all effective source paths for a given Delphi project, which are defined on project level and in the global IDE configuration. Is there a Delphi library which can collect this kind of project information? As far as I know, the registry settings for the Delphi IDE can be in different places, to support multiple configurations. But for a given combination of the IDE registry location and a project file, it should be possible to collect the source paths. Edit : Another solution is to use the --depends switch. This will cause dcc32.exe to

Datasnap : Is there a way to detect connection loss globally?

烈酒焚心 提交于 2019-12-04 04:43:14
I'm looking to detect local connection loss. Is there a mean to do that, as with the events on the Corelabs components ? Thanks EDIT: Sorry, I'm going to try to be more specific: I'm currently designing a prototype using datasnap 2009. So I've got a thin client, a stateless server app and a database server. What I would be able to do is to detect and handle connection loss (internet connectivity) between the client and the server app to handle it appropriately, ie: Display an informative error message to the user or to detect a server shutdown to silently redirect on another app server. In 2

Generic Linked List for Delphi 2009

时光总嘲笑我的痴心妄想 提交于 2019-12-04 03:43:49
问题 I was looking in Generics.Collections and noticed there was no linked list. Sure they are simple to make, but I thought it was odd there was not one (or I just missed it). Are linked lists just outdated when compared to new modern data structures, or is there a need for a general generic linked list? Does anyone know of one? 回答1: Do you know the DeHL? I think the TLinkedList<T> from the DeHL.Collections.LinkedList.pas unit is exactly what you are looking for. 回答2: In the old days, almost any

TLinkLabel background on a TPageControl

前提是你 提交于 2019-12-04 02:19:00
I am trying to use a TLinkLabel on a TPageControl, and I can't find a way to make it use it's parent's background. // Image removed because the website doesn't exist any more // and I can't find it anywhere... Sorry. As you can see, the parent tab sheet's lovely gradient is not preserved behind the link text. I would like the functionality of having multiple links in a flowing block of text (the functionality that TLinkLabel provides) and have the background of the parent showing behind the text. TLinkLabel does not have a ParentBackground property. I have tried creating a derived class that