delphi-2010

Delphi 2010 - Source files randomly become read-only in editor?

↘锁芯ラ 提交于 2019-12-01 02:55:55
问题 Does anyone else have this problem or is my Delphi cursed somehow? I'll have a bunch of forms and files open in tabs in the editor and I'll be typing away and then suddenly everything stops - my .pas file has, seemingly at random, become read-only. Sometimes I can just right-click the tab at the top and uncheck "Read-Only" and continue, but sometimes this option is checked and greyed-out (disabled), meaning I can't uncheck it and I can't make any further edits to the file. This too seems to

Delphi 2010: Where is DockForm.pas?

三世轮回 提交于 2019-12-01 00:13:01
问题 I have to upgrade an old Delphi3 project to Delphi2010. It uses a unit named DockForm , but I cannot find it anywhere in Delphi2010. It is present in the old Delphi3 install CD as uDockForm , but it should be also found in D2010, because own D2010 source files use it (for example, \Embarcadero\RAD Studio\7.0\source\ToolsAPI\ToolsApi.pas ). Where is DockForm.pas or equivalent for D2010? Thanks 回答1: There is no DockForm.pas in D2010 sources but you can use it in your application. Just add

Developing Apps with Administrator Rights in Delphi

混江龙づ霸主 提交于 2019-11-30 20:35:19
I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try to debug the app from the IDE, it reports "Unable to create process. The requested operation requires elevation" ...and it won't run. If I run Delphi as administrator, then my app runs correctly, but this feels like a dangerous brute force approach, especially as most of the apps I develop don't need admin privileges. Is there any way of getting

How to disable the Formatter in Delphi 2010

浪子不回头ぞ 提交于 2019-11-30 20:20:50
The formatter in Delphi 2010 is really an annoying thing to me. I prefer formatting my code manually. I believe I do it better. How can I disable it? NOTE: Answers on why I don't use it in the first place will not be accepted. I need it switched OFF. Nothing more, nothing less. Install DDevExtensions from Andreas Hausladen. In its last version: Version 2.0 (2009-09-13) Added: Embarcadero RAD Studio 2010 support Added: Editor tab double click action (zoom, super-zoom) Added: Source Formatter hotkey (Ctrl+D) can be disabled Remove or rename the file Embarcadero.Modeling.Formatter.dll in Delphi's

Delphi TPath.GetTempPath result is cropped

大城市里の小女人 提交于 2019-11-30 19:03:00
I am using Delphi 2010 and my program wants to get the system's temp path. I am using TPath.GetTempPath and everything is working fine... at least for me and my coworkers. But on some customer machines this method returns a cropped path which is (of course) not existing. I found out that the problem seems to be the result from underlying call to GetLongPathName(). The complete code looks like this: [...] var TmpDir : String; Len : Integer; begin [... Call to GetTempPath succeeds and we have a valid temp directory in short "~" notation in var TmpDir ...] Len := GetLongPathName(PChar(TmpDir),

custom sort method in Delphi to sort list of strings

北城余情 提交于 2019-11-30 17:16:26
问题 I am trying to sort a list of files (they are stored as list of strings) in Delphi whose names look like below a_1.xml a_20.xml a_10.xml a_2.XML when i use quick sort to sort the file names, it sorts the file names as below a_1.xml a_10.xml a_2.xml a_20.XML But, I want the file names to be sorted in the below fashion a_1.xml a_2.xml a_10.xml a_20.XML Any help will be greatly appreciated. 回答1: You can use the same compare function that Explorer uses, namely StrCmpLogicalW. function

Consuming C# WCF service from Delphi 2010 client: Databinding and Entity Framework

泪湿孤枕 提交于 2019-11-30 16:26:25
I am migrating a win32 Delphi VCL application written in Delphi 2010 to a multi-tiered architecture. The application makes extensive use of ExpressGrids (TcxGrid) by devexpress for databinding. I have designed the data tier based on Entity framework, using dbContext and Data transfer objects. I have expose the CRUD operations via WCF using T4 templates based on the entity data model. That's all working fine, Delphi client successfully communicates with the WCF service, to exchange data transfer objects. The problem is, how do I maintain the Databinding functionality ? I am leaning toward

Consuming C# WCF service from Delphi 2010 client: Databinding and Entity Framework

心不动则不痛 提交于 2019-11-30 16:08:17
问题 I am migrating a win32 Delphi VCL application written in Delphi 2010 to a multi-tiered architecture. The application makes extensive use of ExpressGrids (TcxGrid) by devexpress for databinding. I have designed the data tier based on Entity framework, using dbContext and Data transfer objects. I have expose the CRUD operations via WCF using T4 templates based on the entity data model. That's all working fine, Delphi client successfully communicates with the WCF service, to exchange data

What are the best practices for storing user preferences and settings in Win32 Delphi applications?

怎甘沉沦 提交于 2019-11-30 15:57:38
I want to store user preferences (colors,toolbars on/off, panel widths in pixels) and application settings (last 10 files, default save directory, default open directory) within my Delphi Win32 application. What is the best practice for doing this? You have two main options: Store the settings in a file under the user profile. If your settings are simple enough then INI files work perfectly adequately. Store the settings in the registry, under HKEY_CURRENT_USER which is also part of the profile. Personally I prefer to use the registry since it provides hierarchical storage for free. If you use

What are the best practices for storing user preferences and settings in Win32 Delphi applications?

不打扰是莪最后的温柔 提交于 2019-11-30 15:55:20
问题 I want to store user preferences (colors,toolbars on/off, panel widths in pixels) and application settings (last 10 files, default save directory, default open directory) within my Delphi Win32 application. What is the best practice for doing this? 回答1: You have two main options: Store the settings in a file under the user profile. If your settings are simple enough then INI files work perfectly adequately. Store the settings in the registry, under HKEY_CURRENT_USER which is also part of the