delphi-2009

Polymorphism in Delphi Generics

type TParent=class public member1:Integer; end; TChild=class(TParent) public member2:Integer; end; TGArray<T: TParent>=class public function test:T; end; implementation var g:TGArray<TChild>; function TGArray<T>.test:T; begin Result:=??.create; // <<<< Problem ! end; ...

open default browser with a post in Delphi

I know in delphi you can open the default browser with: ShellExecute(self.WindowHandle,'open','www.website.com',nil,nil, SW_SHOWNORMAL); but I'm wanting to know if there is a way to automatically post data on the new opened brower window OR auto fill the login data (even in firefox, safari,etc) Thanks -Brad ...

Is it possible to use WIndows Speech Recognition Engine in a word pronunciation game?

I use to create an application that uses the windows speech recognition engine or the SAPI. its like a game for pronunciation that it give you score when you pronounce it correctly. but when i started experiments with SAPI, it has poor recognition unless if you load a grammar on it (XML) its give best recognition result. but the proble...

Delphi - How To Auto Highlight 1st entryIn A DBLookupListBox On Form Creation.

How do I auto highlight the 1st entry in a DBLookupListBox without the end user highlighting it. procedure TForm2.FormCreate(Sender: TObject); begin Form2.ActiveControl := DBLookupListBox1; end; But this doesn't work, I've also tried DBLookupListBox1.setfocus on form create, but this gives an error, because the DBLookupListBox is ...

Is Code Completion speed improved in Delphi 2010?

I am working with Delphi 2009 Pro and just tried to find out why code completion is so slow in my setup. Whenever code completion is invoked, the IDE locks up for up to 30s, which really interrupts any workflow. When working with BDS 2006, code completion was incredibly fast compared to Delphi 2009. After reading this post it seems to be...

DBExpress connecting SQL 2008 at runtime with Delphi 2009

Hi, I'm trying to connect at runtime with SQL Server 2008 with Delphi 2009 using DBExpress, it it's not working. When I set all the properties at design time, it works great, but at RunTime, I'm getting "unknown driver: mssql". Below is the code: scnConexao := TSQLConnection.Create(nil); scnConexao.DriverName := 'MSSQL'; scnCone...

EUpdateError exception not recognized when raised in TDatasetProvider.OnUpdateError. Why?

When I re-throw a EUpdateError exception in the TDatasetProvider.OnUpdateError event, it is not recognized as EUpdateError exception in the catch block. It's only recognized as base Excption. try ... //calls the TDatasetPorvider.OnUpdateError event. myClientDataSet.ApplyUpdates(0); ... except on ex: EUpdateError do begin //...

How to trigger the event together on each two deferent class.

I have two object class on a single unit, is it posible to trigger the two events? let say the FIRSTCLASS event is fired, The SECONDCLASS also will fired? Assuming...... //{Class 1}------------------------------------------------------------- type TOnEventTrigger = procedure(Sender : Tobject; Value :integer); TMyFirstClass = Cla...

Application.ProcessMessages hangs???

my single threaded delphi 2009 app (not quite yet complete) has started to have a problem with Application.ProcessMessages hanging. my app has a TTimer object that fires every 100 ms to poll an external device. i use Application.ProcessMessages to update the screen when something changes so the app is still responsive. one of these ...

interesting stack problem?

i have an interesting problem in my delphi 2009 app. when run in the debugger, i get an AV between the subroutine's Begin keyword and the first statement. i believe that's when it's setting up local variables. here's the information shown in the debugger: uDeviceModule.pas.940: begin // _GetMeasurementsForChannel 00AF24C8 55 ...

Delphi: is there an RTL function to remove the accents from a string?

I need to remove accents from strings, is there a Delphi (2009+) function for this? I want that my string contains only A-Z a-z 0-9 chars, so I want to remove accents automatically Like: RemoveAccents(àèÃÜÿñ) that gives aeAUyn etc.... ...

Register custom form in delphi 2010 with ToolApi

Hi, I have custom form which is descendant from TForm. I used ToolApi to register custom module and add it to repository. So far so good. But when I click on File->New I can see my category with icon for my custom form but it is disabled. Icon is grayed and I cannot select it to create my custom form from menu and add it to project. ...

fmShareDenyWrite mode doesn't appear to work

I'm using a TFileSteam to open a log file. I would like to be able to read through this log file from other processes. I thought the fmShareDenyWrite mode would allow this. However if I try to open the file from other processes, I get an error. For example, if I try and type the file from the command line, I get "the process can not acc...

Why does the Delphi compiler create a file named 'c' during a build of a specific project?

When I build my project and the main form is open (fairly large, dozens of components of all kind), the build process creates a file named 'c' in the project folder. The file is empty. If I close the main form in the IDE, the build process doesn't create that file. How can I find out what causes this and why does the compiler care which...

Step by step upgrade of Indy 10 in Delphi 2009

Can someone help in telling the details on how to uninstall Indy 10 and install the latest build? I found it http://indy.fulgan.com/ZIP/IndyTiburon.zip There is a similar question, but not a satisfying answer, just some comments from the user who asked, but that is not a step by step guide. Why there is not a tool for this? ...

Delphi 7 compared to 2009 (& 2010) Record sizes

Hi There... I have a weird issue when converting code from Delphi 7 to 2010. It has to do with records. The record defined below, when sized in D7, is 432 bytes, and in D2009 (and 2010) it's 496. I know, that an easy solution is to make it a packed record, then all versions come out to 426 bytes... However, we have data stored where ...

Is there an easier way to convert Delphi 7 to Delphi 2009?

Is there an easier way to convert Delphi 7 to Delphi 2009? or is there a way to use a Delphi 7 unit in a Delphi 2009 project? I have a unit in Delphi 7 but the behavior is all messed up when I try to use it in my Delphi 2009 project. It has a lot of differences like: Hangul = 'ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ' + 'ㅏㅐㅑㅒㅓㅔㅕㅖㅗㅛㅜㅠㅡㅣ'; Sho...

Google Maps inside Delphi 2009 Application

Hi, In this project my aim is to create a software via GoogleMaps in Delphi 2009, it will be like this one but in different way. In this project the user can add a point on the map and in every point beside the icon I will add some information and these information should be relate with the icon, so if the user want to click on one of t...

How can I get png image RGBcolors in delphi 2009

I have a cipher encoded as a color series in a png image the image is RGB-colored but the code is ciphered only in the green byte How can I get the RGB colors in this 1x84 pixel image? ...

Why does a "T" icon appear in Delphi's "Search for Usages" dialog?

Instead of the normal IDE application icon, Delphi 2009 shows a small icon with a "T" in the "Search for Usages" dialog (see image below). What does this symbol mean? ...