Delphi

Changing taskbar button color on Windows

限于喜欢 提交于 2020-01-03 03:04:07
问题 Multiple instances of the same application are running at the same time, and since each has multiple windows, it is not easy for the user to navigate between them. I help users by setting the titlebar color of different application instances to a different value. For example, all windows of the app instance started first will have red titlebar, all windows of the second instance will have a green one, etc. It would also be useful to set the taskbar button color of app instances to the color I

External modules security

主宰稳场 提交于 2020-01-03 02:55:14
问题 I am developing some external modules for an application. These modules are BPL files and if present in the application folder the application loads them and uses whatever is available inside. How can I prevent the sharing of these modules by my clients? I need them to be authorized to use the modules (module by module). To have some sort of license, registration of the module, what is the best method? Thanks 回答1: Simple idea (1): I assume your clients all have some sort of unique ID (serial

Strange WM_CHAR behaviour (wrong chCharCode)

时光怂恿深爱的人放手 提交于 2020-01-03 02:48:27
问题 I need to automate entering a certain character (Russian letter Э ). In Spy++ the corresponding message looks like this: WM_CHAR chCharCode: '221' (221) cRepeat:1 ScanCode:28 fExtended:0 fAltDown:0 fRepeat:0 fUp:0 In order to send this message programmatically, I use this Delphi code: SendMessage(Self.PassengerGrid, WM_CHAR, WPARAM(221), LPARAM($280001)); When I examine the results of running my code in Spy++, I see following message: WM_CHAR chCharCode: '89' (89) cRepeat:1 ScanCode:28

Using VCL Styles gives a exception / crash in TOpenDialog

≡放荡痞女 提交于 2020-01-03 02:41:13
问题 I am experiencing a crash / exception when using a simple TOpenDialog with VCL Styles enabled. Without the styles enabled, the dialog is of course working fine. The issue occurs with C++ Builder 10 and 10.1 Professional. To reproduce: create a simpe VCL Form that uses styles add a TComboBox, a TButton and a TOpenDialog to the form add the following code to the OnClick event for the button OpenDialog1->Execute(); for(int i=0; i<100; i++) ComboBox1->Items->Add("test text"); ComboBox1->ItemIndex

tfs integration with delphi 2010

a 夏天 提交于 2020-01-03 02:29:12
问题 We are currently upgrading from Delphi 7 to Delphi 2010. With Delphi 7 we use Source Connection to integrate Delphi 7 with TFS, but there does not look like there is going to be a Delphi 2010 version in time. Is there any other integration option out there? 回答1: VssConneXion is not ready for Delphi 2010 yet (there is a version for Delphi 2009 on their downloads page). Currently, I'm running the (Microsoft) Team Explorer for managing my source code check-out/check-in and work-items. It works

Using Livebindings to Assign Several Field Values to an FMX MetropolisUI TListBox Item.Text

空扰寡人 提交于 2020-01-03 02:27:11
问题 I am coding a FMX Metropolis UI application and trying to assign two field values of type string to the Item.Title member of TListBox by LiveBindings technology (using expression engine). When I use a TBindList in the following way: object BindList1: TBindList Category = 'Lists' ControlComponent = ListBox1 SourceComponent = BindSourceDB1 FormatExpressions = < item ControlExpression = 'Text' SourceExpression = 'FieldByName("name1").Text + " " + Field' + 'ByName("name2").Text' end>

Save Printer Setup Parameters

孤街浪徒 提交于 2020-01-03 02:03:07
问题 I am writing a program using Delphi 2006 and storing data in XML files and a Firebird database. I create reports using either FastReports, Excel or QuickPDF. I allow my users to package several reports together and be directed to a destination of their choice, whether it is a PDF file, a printer, the screen, or email. I want my users to be able to configure their printer choices for the reports they send to printers. To do this, I will use the printer dialog to choose a printer and set the

Delphi编码规范

梦想与她 提交于 2020-01-03 01:52:47
规范 --======== 以下是在之前的公司与别人共同参与制定的Delphi开发规范(5年前了,那时用的还是Delphi7,部分规则可能有些过时,但不整理了,觉得有用的人,自己整理成适合自己的开发规范吧), 目 录 一、序言 二、通用源代码格式规则 2.1 缩格 2.2 页边空格 2.3 Begin…End 配对 2.4代码文件中通用符号含义 2.5注释写法 三、Object Pascal 3.1 括号 3.2 保留字和关键字 3.3 过程和函数(例程) 3.3.1 命名/格式化/声明 3.3.2 形式参数 3.3.2.1 格式化 3.3.2.2 命名 3.3.2.3 参数的排序 3.3.2.4 常量参数 3.3.2.5 名称的冲突 3.4 变量 3.4.1 变量的命名和格式 3.4.2 局部变量 3.4.3 全局变量的使用 3.5 类型 3.5.1 大写约定 3.5.1.1 浮点指针类型 3.5.1.2 枚举类型 3.5.1.3 变数和ole变数类型 3.5.2 结构类型 3.5.2.1 数组类型 3.5.2.2 记录类型 3.6 语句 3.6.1 if 语句 3.6.2 case 语句 3.6.2.1 一般性话题 3.6.2.2 格式 3.6.3 while 语句 3.6.4 for 语句 3.6.5 repeat 语句 3.6.6 with 语句 3.6.6.1 一般话题

`EOleException: Call was rejected by callee` while iterating through `Office.Interop.Word.Documents`

半世苍凉 提交于 2020-01-03 01:10:46
问题 I've been working with Word2010.pas for the past week and everything went well, until I found out that if you open a document manually , edit it (but don't save), press Alt+F4 , a prompt will show up saying if you want to save your document or not, leave it like that. Go into code and try to access that document , all calls will result in EOleException: Call was rejected by callee . Once you cancel that Word save prompt, everything works fine. I came across this while writing code that

`EOleException: Call was rejected by callee` while iterating through `Office.Interop.Word.Documents`

限于喜欢 提交于 2020-01-03 01:10:21
问题 I've been working with Word2010.pas for the past week and everything went well, until I found out that if you open a document manually , edit it (but don't save), press Alt+F4 , a prompt will show up saying if you want to save your document or not, leave it like that. Go into code and try to access that document , all calls will result in EOleException: Call was rejected by callee . Once you cancel that Word save prompt, everything works fine. I came across this while writing code that