* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
Android / Re: LAMW: jListView - HighLightSelectedItemColor
« Last post by c4p on Today at 12:43:13 am »
I think the issue with jListView item highlight is if you set the font color to anything other than colbrDefault it will not set the color by HighLightSelectedItemColor. Just discovered this by accident when I added the new jListView component and set the font color to white and then the highlight stopped working.
Sorry for giving you more work.  :(
2
General / Re: Capturing a specific part of the screen.
« Last post by RAW on Today at 12:12:06 am »
Quote
Is there a way to get the cursor too on Linux?

Maybe:
Code: Pascal  [Select]
  1. bmp:= TBGRABitmap.Create(Monitor.Width, Monitor.Height);
  2. bmp.TakeScreenshotOfPrimaryMonitor;
  3.  

Did you try this ? Or ask Circular he should know ...  :)
3
General / Re: Global keyboard hook
« Last post by M[a]nny on May 29, 2017, 11:58:04 pm »
I am using Lazarus 1.6.4 and FPC 3.0.2 (both should be newest one).
I have tried what you've told me but i'm still getting the same error:

Code: Pascal  [Select]
  1. umain.pas(142,76) Error: Incompatible type for arg no. 2: Got "<address of function(LongInt;Int64;Int64):LongInt;StdCall>", expected "<procedure variable type of function(LongInt;Int64;Int64):Int64;StdCall>"
4
Other / Re: Compile error on FPC trunk
« Last post by Leledumbo on May 29, 2017, 11:45:03 pm »
Something is definately broken with the trunk for Lazarus vs the trunk for the FPC compiler...
I'm usually the one who reports that when happened. I guess most if not all Lazarus committers use stable FPC as that's what Lazarus is advertised to support. The point is it could go broken anytime unnoticed, which won't get fixed if no one reports, so please do so (don't forget the "steps to reproduce").
5
LCL / Re: TForm.OnMouseLeave not working
« Last post by GetMem on May 29, 2017, 10:40:28 pm »
Quote
@Handoko
Does it work on your test? Let me know, so I will report it to the bug tracker forum.
It works both under windows and linux, but only if the form is empty. If you place another control, for example a memo with align-->alClient, the events are not triggered and AFAIK this is the intended behavior, because now the OnMouseEnter of the Memo is triggered instead.

As a workaround you can do something like this:
1. Drop a timer to your form, set interval to 50 ms
2. Declare a private variable FMouseOverForm
Code: Pascal  [Select]
  1. uses LCLIntf;
  2.  
  3. procedure TForm1.tmTimer(Sender: TObject);
  4. var
  5.   P: TPoint;
  6. begin
  7.   GetCursorPos(P);
  8.   P := ScreenToClient(P);
  9.   if (PtInRect(ClientRect, P)) and (not FMouseOverForm) then
  10.   begin
  11.     Caption := 'Mouse enter';
  12.     FMouseOverForm := True;
  13.   end else if (not PtInRect(ClientRect, P)) and (FMouseOverForm) then
  14.   begin
  15.     Caption := 'Mouse leave';
  16.     FMouseOverForm := False;
  17.   end;
  18. end;


PS: Alternatively you can redirect all OnMouseEnter/OnMouseLeave to a single event.
6
General / Re: Lazarus won't start
« Last post by Martin_fr on May 29, 2017, 10:36:15 pm »
Did you try the logfile again, making sure to specify a write-able location?

control + c doesn't stop anything so i can't use the other commands

Strange... I tested this on my windows, but I don't have win10.

Really silly question, you did focus the gdb window again (since focus would move to any (potentially hidden) window, that may have opened)?


I am running out of ideas here.

When it stalls, using cpu, is there any disk activity? Then maybe it is trying to find the fpc.exe. But usually that is never a problem, unless you have lots of (over 10) different fpc installed. (I guess you have not)


Random things to try:
edit your environmentoptions.xml (in the user/AppData/lazarus folder)
Code: XML  [Select]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EnvironmentOptions>
  4.     <Version Value="110" Lazarus="1.9.0"/>
  5.     <MultipleInstances Value="AlwaysStartNew"/>
  6.  
ADD the last line / Dont worry if you have a diff version, leave the version as it is.


create or edit a file editormacroscript.xml (in the same folder)
Code: XML  [Select]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EMS>
  4.     <Settings SelfTestFailed="1" SelfTestError="failed last time"/>
  5.   </EMS>
  6. </CONFIG>
  7.  


Btw config: IIRC, you said you cleared those files before? Did it create them from scratch? (It should)
C:\Users\USERNAME\AppData\Local\lazarus\*.*
7
General / Re: Global keyboard hook
« Last post by GetMem on May 29, 2017, 10:29:22 pm »
What is your Lazarus/FPC/Windows version? It seems like SetWindowsHookEx declaration is wrong.

Try to declare SetWindowsHookEx like this(after ToUnicodeEx):
Code: Pascal  [Select]
  1. function SetWindowsHookExA(idHook:longint; lpfn:HOOKPROC; hmod:HINST; dwThreadId:DWORD):HHOOK; stdcall; external 'user32.dll';
Then call it on line 140:
Code: Pascal  [Select]
  1. if llKeyboardHook = 0 then
  2.   llKeyboardHook := SetWindowsHookExA(WH_KEYBOARD_LL, @LowLevelKeyboardHook, HInstance, 0);
8
Android / Re: LAMW: jListView - HighLightSelectedItemColor
« Last post by c4p on May 29, 2017, 10:16:22 pm »
Yes, I reorganised my folders on reinstall, should be ok now, thanks.
9
Android / Re: LAMW: jListView - HighLightSelectedItemColor
« Last post by jmpessoa on May 29, 2017, 09:51:44 pm »

Hi  c4p,

If you put the new stuff in LAMW folders, all files in your project will be updated after a re-build.
10
General / Re: Global keyboard hook
« Last post by M[a]nny on May 29, 2017, 09:48:12 pm »
Thanks for your effort, it looks wonderful :) But i get this error message when i am trying to compile the code:
Code: Pascal  [Select]
  1. umain.pas(140,77) Error: Incompatible type for arg no. 2: Got "<address of function(LongInt;Int64;Int64):LongInt;StdCall>", expected "<procedure variable type of function(LongInt;Int64;Int64):Int64;StdCall>"
Is there something i can do in order to fix it?
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus