delphi-2006

How to Convert Simple RichText to HTML tags in Delphi?

 ̄綄美尐妖づ 提交于 2019-12-04 13:04:01
问题 You may say that there are lots of discussions about this in stackOverflow, but most of them are more complicated than what I need and mostly for other languages. I have a MySQL remote database in which I have a "Help" table with the code for filling the help pages of the dynamic web site that uses this database. I decided to make a Delphi application to manage that website instead of doing by the web site itself for more speed and security. I want to put a TRichEdit to make that help text

Why doesn't {$ifopt FINITEFLOAT ON} compile?

a 夏天 提交于 2019-12-04 04:58:58
I have the construct: {$ifopt FINITEFLOAT ON} {$message 'FINITEFLOAT option ON' } {$else } {$message 'FINITEFLOAT option OFF' } {$endif } in my source and it won't compile! It's got to be something stupid. The error is: E1030 Invalid compiler directive: '$IFOPT' at the first line, but it is the FINITEFLOAT it's complaining about. You don't seem to be able to specify anything except the single letter directives like R+ etc as the argument of IFOPT. Am I missing something here? You are totally correct AFAICT. I don't use $IFOPT often but everytime I do this behaviour annoys me. I have no idea

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

故事扮演 提交于 2019-12-03 21:18:40
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 this application uses. When I use the numeric keyboard (the size of a regular remote control) and press 5

Delphi - Application independent of Regional Settings

给你一囗甜甜゛ 提交于 2019-12-03 20:49:47
I need to make an application(D2006) independent of Regional Settings, most important all the dateformats must be the same. For the begging I want to replace all the FormatDateTime('adateformate') with FormatDateTime('aConstantDefined'). Also Application.UpdateFormatSettings and Application.UpdateMetricSettings should be set to False. Is there anything else I should make/take care? LE: problem is that I have users with 2 different Regional Settings, and they don't want to uniform their settings. I know that sounds strange, but this is the fact. So, this is the reason why I need to make my

Tools which can parse Delphi XMLDoc format and build online help

淺唱寂寞╮ 提交于 2019-12-03 14:11:06
问题 The XMLDoc tool for API documentation is explained here: http://edn.embarcadero.com/article/32770 Are there any free or commercial tools which can be used to create documentation based on Delphi's XML doc format? Is there a newer version of the 'getting started' documentation? This page refers to Delphi 2005 and third party tools, some of them seem to have moved. The XMLDoc for Delphi 2005 required Python (tested with Python 2.3) Instant Saxon (tested with Instant Saxon 6.5.3) The Java SDK

How to make TFrame with rounded corners?

空扰寡人 提交于 2019-12-03 04:35:00
问题 I want to make a component based on a TFrame with TLMDShapeControl (for drawing round corner background) and a TEdit control (that can be also a TComboBox or a TDBEdit and so on). After that I will use the "Add to Palette" command to turn it into a Reusable Component Control. The problem in that I need it to be width flexible and for that I had the idea of turn everything inside the Frame alClient and the TEdit with 5 pixel margin so the user can see the rounded corners. It was terrible

Tools which can parse Delphi XMLDoc format and build online help

爱⌒轻易说出口 提交于 2019-12-03 04:04:39
The XMLDoc tool for API documentation is explained here: http://edn.embarcadero.com/article/32770 Are there any free or commercial tools which can be used to create documentation based on Delphi's XML doc format? Is there a newer version of the 'getting started' documentation? This page refers to Delphi 2005 and third party tools, some of them seem to have moved. The XMLDoc for Delphi 2005 required Python (tested with Python 2.3) Instant Saxon (tested with Instant Saxon 6.5.3) The Java SDK (tested with J2SE v 1.4.2_05 SDK) and also the Visual Studio Help Integration Kit Check out: Help and

How to make TFrame with rounded corners?

大憨熊 提交于 2019-12-02 18:53:10
I want to make a component based on a TFrame with TLMDShapeControl (for drawing round corner background) and a TEdit control (that can be also a TComboBox or a TDBEdit and so on). After that I will use the "Add to Palette" command to turn it into a Reusable Component Control. The problem in that I need it to be width flexible and for that I had the idea of turn everything inside the Frame alClient and the TEdit with 5 pixel margin so the user can see the rounded corners. It was terrible because I can't use Align and set components one in the top of another. Now I have to copy and paste the

Background Worker Delphi

混江龙づ霸主 提交于 2019-12-02 07:57:55
I would like to prepare asynchronous process for procedure in Delphi Borland 2006 do you know how? application.ProcessMessages; dm001.Proc.Close; dm001.Proc.Parameters.Clear; dm001.Proc.ProcedureName:='[dbo].[EXAMPLE]'; dm001.Proc.Parameters.AddParameter.Name:='@idEXAMPLE'; dm001.Proc.Parameters.ParamByName('@id').DataType:="example"; dm001.Proc.Parameters.ParamByName('@id').Value:="example"; dm001.Proc.Open; Example in C# private void bw_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; for (int i = 1; (i <= 10); i++) { if ((worker

Fast way to split a string into fixed-length parts in Delphi

痴心易碎 提交于 2019-12-01 18:39:32
I need to split a string to a TStringList with fixed-length sub-strings. Currently I use: procedure StrToStringList(ASource: string; AList: TStrings; AFixedLen: Integer); begin Assert(Assigned(AList)); while Length(ASource) > AFixedLen do begin AList.Add(LeftStr(ASource, AFixedLen)); Delete(ASource, 1, AFixedLen); end; AList.Add(ASource); end; This works, but seems to be slow. Any better / faster idea? Edited: Profiling of the results : The speed gain is quite impressive. Here are the results of my (subjective) profiling. Data size: 290KB, FixedLen: 100: Original code: 58 ms Heffernan: 1 ms