good morning, a question, in the demo "EditorBrowser" how can I start the application with the active cursor to be able to write quickly?
I am using lazarus on windows 10
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
demo "EditorBrowser" active cursor to write at startup
- salvadordf
- Posts: 4099
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: demo "EditorBrowser" active cursor to write at startup
Hi,
Add a TTimer called "Timer2", set the Timer2.Interval property to 1000 ms and Timer2.Enabled to FALSE.
Add this code in TForm1.BrowserCreatedMsg :
Then add this code in the Timer2.OnTimer event :
Add a TTimer called "Timer2", set the Timer2.Interval property to 1000 ms and Timer2.Enabled to FALSE.
Add this code in TForm1.BrowserCreatedMsg :
Code: Select all
procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
begin
Caption := 'Editor Browser';
Timer2.Enabled := True;
end;
Code: Select all
procedure TForm1.Timer2Timer(Sender: TObject);
begin
Timer2.Enabled := False;
PostMessage(Chromium1.RenderHandle, WM_LBUTTONDOWN, 0, 0);
PostMessage(Chromium1.RenderHandle, WM_LBUTTONUP, 0, 0);
end;