delphi

GPS Software for PC

hi ! I will start on a private project that will require some GPS software on my computer, so far I have been contacting Garmin and Destinator to ask if they have some sort of SDK kit for theire map services. however they could not offer me this in Norway. I am therefore asking here if anyone here know any kind of map software, capable...

Wierd error "Type information missing for class Tmyclass"

Getting this error on a call inside the Delphi Initialization section of an Impl unit on a line like. TAutoObjectFactory.Create(ComServer, TmyClass, Class_myclass, ciMultiInstance, tmApartment); the type is defined as Tmyclass = class(TAutoObject, IConnectionPointContainer, Imyclass) and it results ultimately in a "Runtime error...

"specific to a platform" warning in Delphi 6 on Windows 7

We have some legacy code that compiles in Delphi 6. There are plans to rewrite it in a more current IDE, but they are a ways out. When we compile it we get several warnings like this: FPrecision is specific to a platform. This is in VCL\DB.pas. (Not our file.) FPrecision is defined like this: FPrecision Integer Platform I can see...

Delphi: Understanding constructors

i'm looking to understand virtual override overload reintroduce when applied to object constructors. Every time i randomly add keywords until the compiler shuts up - and (after 12 years of developing with Delphi) i'd rather know what i'm doing, rather than trying things randomly. Given a hypothetical set of objects: TComputer = cla...

Delphi: How to add a different constructor to a descendant?

Update: The example i originally had was kind of complex. Here's a simple 8 line example that explains everything in one code block. The following does not compile gives a warning: TComputer = class(TObject) public constructor Create(Cup: Integer); virtual; end; TCellPhone = class(TComputer) public constructor Create(Cup: Integ...

Delphi: When does reintroduce hide ancestors and when does it show them?

Today Recently on Stackoverflow i learned that: reintroduce is used to hide ancestor constructors reintroduce is used to show ancestor constructors i've been trying to make sense of it all, so here is a another, very specific question, supporting my main question dealing with constructors. Update: replaced the entire question: TC...

Delphi Interbase Sql Conversion to Sql Server and Oracle

hello, i have a delphi application which uses database interbase / firebird. To consult and write data I use the InterBase components palette (IBTable, IBQuery, IBDataset). I'm performing the conversion of my system to sqlserver / Oracle but i have thousands of queries that are assembled at runtime with SQL Instructions Specific of datab...

"Method '%s' hides virtual method of base type '%s'". What's really being hidden?

After having read Ian Boyd's constructor series questions (1, 2, 3, 4), I realize I don't quite grasp the literal meaning on what's being hidden. I know (correct me if I'm wrong) override's sole purpose is to be able to have polymorphic behavior, so that run-time can resolve a method depending on the actual type of an instance - as oppo...

Delphi 6 : How to create a Bitmap with TextOut that has an Alpha channel?

I'll describe my overall goal in case the question I asked isn't in the best form to get the answer I'm looking for. I have a sphere of words or "word ball" that spins around the X axis. As words spin to the back (Z coordinate goes from -1 to 1, front to back), I intend to change the size and the opacity of each word so that words in "...

Suggestions for caching a dataset

I'd like to perform the following: 1) Open a dataset (using TMSQuery, SDAC DevArt component) 2) caching the content to disk (imagine a list of cutsomers) 3) the next time I need to Open the dataset I will first populate it with cached data, then I will just Refresh it by calling TMSQuery.RefreshQuick method. In this way I plan to ob...

which is fastest win32 or SQL query?

Hi, I'm writing a client-server win32 application in Delphi 7 and in a section i need to bring aprox. 100k (less or more) rows with data from an Oracle database. Everything ok so far, but one of the fields must be calculated (a simple division with a large number). My question is, how is less resources consuming and optimum, to make th...

Delphi - form maximized event

Hi, I want to call a function after a form has been maxmized or restored. I know I can something like this: procedure TfrmMain.WMSysCommand; begin if (Msg.CmdType = SC_MAXIMIZE) OR (Msg.CmdType = SC_RESTORE) then begin Showmessage(IntToStr(frmMain.Height)); end; DefaultHandler(Msg) ; end; But the problem is: this eve...

Delphi - Convert byte array to string

How do I convert a byte array to a string (base 256) in Delphi? ...

Delphi Access to Thread Variables

I have a thread that does a WMI query for me and I need to access some variables in the thread after it has executed the query. The thread is created as follows ... procedure TFormMain.RunThread; var WMIQ: TThreadWmiQuery; begin WMIQ := TThreadWmiQuery.Create(True); ... WMIQ.OnTerminate := WMIQThreadOnTerminate; WMIQ.Resume;...

TStream.Position compared to TStream.Seek

Hello folks, To move the "current byte" pointer in TStream class we can use property Position (e.g. MyStream.Position := 0) or using Seek method (e.g. MyStream.Seek(0, soFromBeginning). The question is, which one is more efficient (aka faster)? (I don't have the source, so I could not check it myself). So far I always use Seek in posit...

Closing 2 secondery delphi forms with 'caFree' causes the Main Form to lose focus

Showing 2 secondary forms from the main form and then closing both forms will cause the main form to lose focus. (another application gets activated instead of mine) The secondary forms are created either by the Main Form directly or by creating the third form from the second form. The secondary forms set caFree in the OnClose event: ...

MSXML - Namespaces info not persisting

I am using MSXML 6.0 to perform a transform of my own XML into another XML format. I am not sure if I maybe just don't understand exactly how MSXML works, but I believe I have noticed some strange behaviour with it.... I am adding in the namespaces to my XML doc using the setProperty method e.g. XmlDocument.setProperty('SelectionNamesp...

How can I tell when a Delphi TDBGrid has finished populating from a database?

I have a database populating a TDBGrid in Delphi 2007 Pro. When the grid finishes populating, I want to automatically fill a list box based on data processed from the grid. I can do this manually by watching and waiting for the grid to completely fill with the dataset and then calling my next procedure. Is there an event that would al...

Delphi 6 : How can I display large size high quality Text via the TextOut() method?

I have a TImage component that I print a Text string to using TCanvas.TextOut(). I set the height and width of the TImage to a large size like 50 pixels X (TextWidth) pixels, and set the Canvas font Height to something a little smaller like 48 pixels. I then BitBlt() the TImage's bitmap on to the main Canvas. What I see on the screen ...

Disable Drag & Drop of windows explorer using Delphi

Hi , How can i disable Drag & Drop item of Windows Explorer using Delphi APP ? I want to disable Drag & Drop that user can,t drag any file form Windows Explorer ... Regards, Silverboy . ...