home *** CD-ROM | disk | FTP | other *** search
- unit FixCodeParams;
-
- //This unit fixes the problem of the Code Parameters window not appearing
- // 1) Add this unit to a new package (File | New... | Package)
- // 2) Install the package (press the package editor's Install button).
- // The problem will now be fixed.
- // 3) Uninstall the package (Component | Install Packages...,
- // select the package from the list and press Remove)
-
- interface
-
- procedure Register;
-
- implementation
-
- uses
- Windows, Controls, SysUtils, Forms;
-
- procedure Register;
- var
- I: Integer;
- R: TRect;
- CodeParams: TCustomControl;
- begin
- for I := 0 to Application.ComponentCount - 1 do
- begin
- if (CompareText(Application.Components[I].Name, 'CodeParamWindow') = 0) and
- (CompareText(Application.Components[I].ClassName, 'TTokenWindow') = 0) then
- begin
- CodeParams := Application.Components[I] as TCustomControl;
- GetWindowRect(CodeParams.Handle, R);
- SetWindowPos(CodeParams.Handle, HWND_TOP,
- R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top,
- SWP_NOACTIVATE);
- SetWindowPos(CodeParams.Handle, HWND_TOPMOST,
- R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top,
- SWP_NOACTIVATE);
- Break
- end
- end;
- end;
-
- end.
-