delphi-2009

Why won't Delphi 2009 let me Include a Char in a set?

本秂侑毒 提交于 2019-12-11 10:43:24
问题 Here is another question about convert old code to D2009 and Unicode. I'm certain that there is simple but i don't see the solution... CharacterSet is a set of Char and s[i] should also be a Char. But the compiler still think there is a conflict between AnsiChar and Char. The code: TSetOfChar = Set of Char; procedure aFunc; var CharacterSet: TSetOfChar; s: String; j: Integer; CaseSensitive: Boolean; begin // Other code that assign a string to s // Set CaseSensitive to a value CharacterSet :=

How to setup a TIcon instance to support alpha channel icons (SupportsPartialTransparency)

泪湿孤枕 提交于 2019-12-11 10:39:50
问题 Using Borland C++ Builder 2009 I notice that when replacing images in a TImagelist, the alpha channel data gets corrupted somehow. TIcon *Icon = new TIcon() ; for (int x = 0 ; x < OS_Specific_count ; x++) { OS_xx_ImageList->GetIcon(x, Icon) ; Use_ImageList->ReplaceIcon(x, Icon) ; } delete Icon ; The problem is also described (+screenhots) in another Q ( TImageList - True color + alpha channel vs. 8-bit (256 colors) ) but I'm now trying to narrow things down with more specific questions. While

Compiling with Delphi 2009 from a command line under Windows Vista 64-bit

老子叫甜甜 提交于 2019-12-11 09:49:57
问题 Has anyone succeeded to compile a Win32 GUI app with the command line dcc32.exe compiler, under 64-bit Windows Vista, without installing Delphi 2009? On our system it fails, with a message that the DFM files contain unknown 16-bit resources. This is usually an indication that the DFM files cannot be read. It works perfectly on all 32-bit Vista and Windows XPs, that we tried. I am asking, because we want to ensure that we can rebuild our current exe files later, if needed, so even if we all

How to change Delphi Build configuration?

断了今生、忘了曾经 提交于 2019-12-11 07:41:58
问题 How to change the Delphi 2009 Build configuration? The only place I see is on top of the Project Options window, anyway I don't feel that the options are applied. 回答1: Two Ways From the Project Menu Project > Configuration Manager Select one or more projects from the Applicable projects list. Select the configuration from the Configuration ComboBox. Click the green play button (Makes the configuration active for the project(s) you selected) From the Project Manager: Click the + next to Build

Excel Copy-Paste from Delphi (OLE) with all the formatting?

[亡魂溺海] 提交于 2019-12-11 06:04:18
问题 I have Excel file (old *.xls format, but that should be irrelevant here) with very complex formatting and data: differently merged cells, cells/ranges with custom backgrounds, fonts and so on. And I am trying programmatically copy/paste rectangular region from on file to other. I am using Delphi (2009, but that should be irrelevant as well), I am using OLE code and Excel_TLB. I have the following code: procedure TMainForm.PrepareBtnClick(Sender: TObject); var OldFileName: string; OldApp:

Delphi TColorDialog Opens behind a stayOnTop form

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:04:09
问题 I have a main form (form1) that calls form2 which is a stayontop form. form2 calls a modal form (form3) which is also a stayontop form. when form3 modal form calls the colordialog, the color dialog opens behind form3. What to set to open color dialog in front of form3? I'm using D2009 thanks 回答1: Delphi (around D2007) introduced an overloaded Execute methods for all of the standard dialogs that accept a parent window handle as a parameter. Change your call to display the dialog: if

Installing Same Components Under Delphi 2009 and Delphi XE not working

荒凉一梦 提交于 2019-12-11 04:23:37
问题 I have a set of custom components that I've been using in D2009. I have installed Delphi XE, and I'd like to be able to use these components in both IDE's while I'm upgrading my projects. But when I install them in XE, they are no longer really usable in D2009. A project will still compile, but the components no longer show up in the Tool Palette, and they don't appear in the form designer either. No matter how I try to uninstall/reinstall, etc., I can't get the components to work in D2009. I

How can I find the colour of any pixel on the screen

你说的曾经没有我的故事 提交于 2019-12-11 03:57:02
问题 I usually program in VB6 but but I believe with that I might be restricted to details within the active form. I also have codegear 2009 with c++ and delphi, that I got from a mate but I only have a little experience with Delphi and none at all with c++ but at least I have them if one of those program need to be used to acheive what I'm trying to do. I want to be able to do something like IF pixelVar(x,y) = 'Red' ( or 'RGBvalue or whatever the correct colour representation) THEN do something

Can Delphi 2009 build web service that returns a DataSet?

假如想象 提交于 2019-12-11 02:25:30
问题 In the sample Delphi web service tutorials I've read, they tend to build a web service that returns a simple string or integer, e.g. http://blogs.codegear.com/pawelglowacki/2008/12/18/38624 However, I read it's possible in .NET to build a web service that returns a DataSet or even an object. Is this possible in Delphi 2009, and if so where can I find more info on this? Also, what's your opinion on tools for building a web service, between Delphi and .NET? 回答1: Delphi 2009 has full suport for

How to convert workspace coordinates to screen coordinates?

99封情书 提交于 2019-12-11 02:24:00
问题 I want to convert the workspace coordinates returned by GetWindowPlacement in rcNormalPosition.Left and rcNormalPosition.Top to screen coordinates that I can assign later to MainForm.Left and MainForm.Top . How can I do that ? 回答1: The simplest and cleanest way is to use the API function that partners with GetWindowPlacement , namely SetWindowPlacement. That way you don't need to convert between workspace and screen coordinates because you let the system do the work for you. var