Archive

Archive for the ‘Delphi / Kylix IDE’ Category

How to Find Out if Delphi is Running

December 15th, 1999 m3Rlin No comments

You may want your program to check if Delphi is running. Well, if so try out this code. This is the method for programs:

function IsDelphiRunning: Boolean;
begin
  Result := (FindWindow('TAppBuilder', nil) > 0);
end;

If you want to check if Delphi is running and you are creating VCL components then you should check for the csDesigning flag.
Here’s the code:

  if csDesigning in ComponentState then
    { Delphi IDE is running }
  else
    { Well, Delphi IDE is not running... }

How to Obtain all Characters in Delphi 4+ IDE

December 15th, 1999 m3Rlin No comments

Starting with Delphi 4 certain shortcuts have changes and/or been added that make it hard to put certain letters into the Code Editor or Object Inspector. For example the Polish letter “ś” is entered by pressing Alt + S. Well, Delphi doesn’t make this possible because Alt + S is already assigned as an IDE shortcut. You can either:

  1. Copy the letter in another application and then paste it in Delphi ;-) .
  2. Use the Alt + character code method to create the letter.
  3. Disable Alt shortcuts in Delphi. This is the preferred way ;-) by programmers who have to create non-English applications every day. To turn the shortcuts off launch the Registry Editor (regedit.exe) and find the following key: HKEY_CURRENT_USER\SOFTWARE\Borland\Delphi\4.0 (or whatever version you are using)\Editor\Options. Now create a string value named “NoCtrlAltKeys” and set it’s value to “1″. If you have Delphi running remember to restart it.