delphi-2006

Change caption and attributes of ShowMessage dialog

六眼飞鱼酱① 提交于 2021-02-07 07:11:40
问题 In Delphi can you change the caption of the ShowMessage dialog because by default it is taking my exe name. And can I change the background color, size of the same? 回答1: You can create your own custom dialogs by using delphi's CreateMessageDialog function. Example below: var Dlg: TForm; begin Dlg := CreateMessageDialog('message', mtInformation, [mbOk], mbOK); // Treat Dlg like any other form Dlg.Caption := 'Hello World'; try // The message label is named 'message' with TLabel(Dlg

How to explain access violation in RtlLeaveCriticalSection

浪尽此生 提交于 2020-01-25 05:07:08
问题 I have an application that requests data from a database triggered by a timer on a form. If there is an error (the connection to the database is lost), I sometimes I get the expected exception (EIBO_ISCError) and sometimes I get an access violation in RtlLeaveCriticalSection of ntdll.dll. Here is the corresponing Eurekalog stack: ------------------------------------------------------------------------------------------------------ |Adresse |Modul |Unit |Klasse |Prozedur/Methode |Zeile | -----

Adding a unit automatically to the project

血红的双手。 提交于 2020-01-21 05:06:10
问题 I am working on a component in Delphi 7 and Delphi 2006 , where I am using a unit which I need to add to the .dpr file of the project on which the component is dropped automatically. Like the way Eureka Log automatically adds the unit 'ExceptionLog' to the project file: Can anyone tell me how to programmatically add a unit to the project file when I drop my component on any form in the project? 回答1: You most likely have to use the Open Tools API for that. Also it might require to write a

Adding a unit automatically to the project

不羁的心 提交于 2020-01-21 05:05:06
问题 I am working on a component in Delphi 7 and Delphi 2006 , where I am using a unit which I need to add to the .dpr file of the project on which the component is dropped automatically. Like the way Eureka Log automatically adds the unit 'ExceptionLog' to the project file: Can anyone tell me how to programmatically add a unit to the project file when I drop my component on any form in the project? 回答1: You most likely have to use the Open Tools API for that. Also it might require to write a

It seems that sometimes Delphi is case-sensitive - “override method should match case of ancestor”

主宰稳场 提交于 2020-01-13 08:52:27
问题 Today I've encountered a 'strange' hint: override method xxxx should match case of ancestor yyyy. Solution was to declare the method name exactly as in the ancestor....I believe this is something which rested in the compiler since the Delphi.Net compiler... Declaring the method exactly as in the ancestor made the compiler 'silent'. There are other 'case-sensitive' hints/warnings in Delphi 2006 and up? 回答1: It's a hint that's in place to protect your code when cooperating with 3rd party code.

It seems that sometimes Delphi is case-sensitive - “override method should match case of ancestor”

给你一囗甜甜゛ 提交于 2020-01-13 08:52:08
问题 Today I've encountered a 'strange' hint: override method xxxx should match case of ancestor yyyy. Solution was to declare the method name exactly as in the ancestor....I believe this is something which rested in the compiler since the Delphi.Net compiler... Declaring the method exactly as in the ancestor made the compiler 'silent'. There are other 'case-sensitive' hints/warnings in Delphi 2006 and up? 回答1: It's a hint that's in place to protect your code when cooperating with 3rd party code.

Getting External Exception C0000006 in D2006 app - how can I force delphi to load the whole executable?

 ̄綄美尐妖づ 提交于 2020-01-11 06:45:13
问题 I get this occasionally when exiting my app - my app is running the EXE over a network. I understand it's a page fault when part of the EXE is loaded on demand. I have also observed it in the OnDrawCell method of a TDrawGrid, so I'm mystified how that might have caused a page load. Also, the exception kept happening. So my questions: Can Error C0000006 result from other causes? I have made fairly major changes to the way the app manages memory, though nothing out of the ordinary, and I'm

Including Delphi Type Libraries in repository (SVN)?

左心房为你撑大大i 提交于 2020-01-05 03:28:23
问题 What is the best way to save a Delphi Type Library in SVN. The file changes every time you compile the Application The file is not saved in a readable form of AscII It is very difficult to work out what changes have been made from one version to the next This is a major problem when more than one person is changing the file QUESTIONS: 1) Should one save an exported ‘IDL’ file in the version control ? 2) Can one covert an ‘IDL ’ into a Delphi type library If so how ? 3) What are the best

Including Delphi Type Libraries in repository (SVN)?

霸气de小男生 提交于 2020-01-05 03:26:11
问题 What is the best way to save a Delphi Type Library in SVN. The file changes every time you compile the Application The file is not saved in a readable form of AscII It is very difficult to work out what changes have been made from one version to the next This is a major problem when more than one person is changing the file QUESTIONS: 1) Should one save an exported ‘IDL’ file in the version control ? 2) Can one covert an ‘IDL ’ into a Delphi type library If so how ? 3) What are the best

How to monitor the keyboard above all other applications and then send other keys to them instead

自闭症网瘾萝莉.ら 提交于 2020-01-01 07:08:00
问题 I am building an multimedia console based on an old computer running Win7. I want to control the players with a numeric keyboard. I can't use the common media control devices because they respond only to windows media player. I will use the KVM Player, Winamp and others. So each one has it's own set of keyboard shortcuts for play, pause, foward, volume etc. For that I am thinking of building a Delphi application that detects the foreground application and gets from a database the shortcuts