delphi-2007

EventHandler inside a TFrame?

陌路散爱 提交于 2019-12-12 08:14:53
问题 I have a TForm (TVehicleEditForm) with 3 identical TFrames (TVehicleUnitFrame) inside. The idea was that every instance of the frame handle own events by a eventhandler inside the frame. The problem is that the eventhandler is not called. I have tried to assign the eventhandler by code inside the frame by overriding the Create method but the handler is not called in that case either. But if I assign the eventhandler outside the frame from the form it works fine. Like this:

How do you line up a TPopupMenu so that it accurately positions itself above a button?

笑着哭i 提交于 2019-12-12 07:35:27
问题 I want a popup menu above a button: Delphi wraps the Win32 menu system in a way that seems to preclude every mode or flag that the underlying Win32 API provides that was not in the VCL author's brain on that day. One such example appears to be the TPM_BOTTOMALIGN which can be passed into TrackPopupMenu but, the Delphi wrapper appears to render this not only impossible in the stock VCL, but by injudicious use of private and protected methods, is impossible (at least seems to me to be

R link error too many resource to handle

坚强是说给别人听的谎言 提交于 2019-12-12 03:43:47
问题 I have a large project(single exe) having three thousand pas files and almost two thousand dfms. It also contains several resource strings and image lists. This project was working very fine and was enhancing this again and again for several modules as per user requirement. I cannot split this application to multiple exes because of several reasons. My customer is willing to buy that much hardware for supporting it. Now recently i started getting "R link error- too many resources to handle"

specific area scanning by Delphi twain

柔情痞子 提交于 2019-12-11 22:15:15
问题 How i can determine the x,y start and the x,y end of scanning using the Delphi twain library ? Also How i can set dpi for scan a document. Thanks. 回答1: AFAIK, for setting a region to be scanned, you can use TTwainSource.SetImageLayoutFramework method. TDelphiTwain.Source returns available Twain sources. For DPI, I guess you should first set CapUnits to tuInches using TTwainSource.SetICapUnits method. Then you can set DPI by calling TTwainSource.SetIXResolution and TTwainSource.SetIYResolution

Delphi: Changing the Button Color using a Class Helper

◇◆丶佛笑我妖孽 提交于 2019-12-11 08:58:57
问题 I need to change the visual style of my delphi form controls inorder to show them from a .Net environment. To do this, I need to change the colors of delphi controls to blue ($00FCF5EE). I have used "TButton" controls widely which doesn't have a "Color" property.So, instead of changing the buttons to speed buttons, I have tried a different approach by introducing a parent form and inheriting all the other forms from this parent form. In the parent form, I have a class helper to change the

Delphi DBX and MySQL connection nightmare : DBX Error: Driver could not be properly initialized

泪湿孤枕 提交于 2019-12-11 07:59:31
问题 Ok, in the past i had a huge headache to make DBX work with MySQL. In such episode i was trying to make it work with Delphi 2007 and i lost days looking for the right libmysql.dll and dbxmys.dll combination, trying dozens until i found one couple that worked. Now i have the same issue this time in Delphi XE. The same libraries used for D2007 does not work with XE, returning the very known infamous error : DBX Error: Driver could not be properly initialized. Client library may be missing, not

Delphi 2007 and {$IFDEF…} directive, fails to see our conditional

感情迁移 提交于 2019-12-11 04:07:31
问题 We have the following in our codebase, in a component file: {$IFDEF ADO} FDatabase : TADODatabase; {$ELSE} FDatabase : TODBCDatabase; {$ENDIF} The reason is that for various legacy applications, one or the other type of database connection and set of classes is to be used. However, while configuring a new machine, it seems that our conditionals aren't taken into account. In the project settings, it says "ADO;DEBUG", and yet it compiles the above code with the odbc type instead. The odd thing

Delphi 2010 or 2007 for upgrading Delphi 3 project?

家住魔仙堡 提交于 2019-12-11 04:05:51
问题 I've just received an assignment to upgrade an old Delphi 3 project that I wrote in 1999 to a newer version and add features (I previously discussed this in related questions here and here). I was assuming that the appropriate route would be to first upgrade my development environment to Delphi 2010 and then port the application. I'm now considering whether to upgrade the application to my existing copy of Delphi 2007 instead in order to avoid the Unicode complications. The application runs

TADOQuery: 'EDatabaseError type mismatch for field 'MyField', expecting: String actual: FixedWideChar' [closed]

狂风中的少年 提交于 2019-12-11 03:43:47
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I have 3 different databases (development, homolog and prod), each of them in one of the following Oracle versions: 11g and 10g. I'm using a TADOQuery to

Delphi ClientDataset Read-only

心不动则不痛 提交于 2019-12-10 20:48:07
问题 I am currently testing with: A SQLConnection which is pointed towards an IB database. A SQLDataset that has a SQLConnection field set to the one above. A DatasetProvider that has the SQLDataset in (2) as its Dataset field value. A ClientDataset, with the ProviderName field pointing to the provider in (3). I use the following method (borrowed from Alister Christie) to get the data... function TForm1.GetCurrEmployee(const IEmployeeID: integer): OleVariant; const SQLSELEMP = 'SELECT E.* FROM