Hi,

I have issue In windows if you hold the key down for more than 30-40
second it will not send new messages to the form and event will not run.
This is my code and it works in Ubuntu very good but not in windows L

> unit Unit1;
>
> {$mode objfpc}{$H+}
>
> interface
>
> uses
>   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
>   ExtCtrls, LMessages;
>
> type
>
>   { TForm1 }
>
>   TForm1 = class(TForm)
>     Panel1: TPanel;
>     procedure FormKeyDown(Sender: TObject; var Key: word; Shift:
>     TShiftState);
>     procedure FormKeyUp(Sender: TObject; var Key: word; Shift:
>     TShiftState);
>     procedure FormShortCut(var Msg: TLMKey; var Handled: boolean);
>   private
>
>   public
>     kd: integer;
>   end;
>
> var
>   Form1: TForm1;
>
> implementation
>
> {$R *.lfm}
>
> { TForm1 }
>
> procedure TForm1.FormKeyDown(Sender: TObject; var Key: word; Shift:
> TShiftState);
> begin
>   WriteLn('FormKeyDown');
>   WriteLn(GetTickCount64);
> end;
>
> procedure TForm1.FormKeyUp(Sender: TObject; var Key: word; Shift:
> TShiftState);
> begin
>   WriteLn('FormKeyUp');
>   Self.OnKeyDown := @FormKeyDown;
>   Self.OnShortcut := @FormShortCut;
> end;
>
> procedure TForm1.FormShortCut(var Msg: TLMKey; var Handled: boolean);
> begin
>   Handled := True;
>   WriteLn('FormShortCut');
> end;
>
> end.

Regards,
Ara

-- 
http://www.fastmail.com - The professional email service

-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to