Jump to content

limelect

Members
  • Content Count

    913
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by limelect

  1. limelect

    How to capture a mouse click outside a modal window?

    I have this project mite help you catch the outside mouse hop it help MyWindowsInspector.zip
  2. limelect

    How to capture a mouse click outside a modal window?

    will this help? function MouseHook (Code: integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; var ClientPt : TPoint; begin {------------------------} { Handle Mouse Movements } {------------------------} if (GlobData <> nil) and (Code = HC_ACTION) and ((wParam = WM_MOUSEMOVE) or (wParam = WM_NCMOUSEMOVE)) then begin with PMouseHookStruct(lParam)^ do begin {-----------------------------} { Send the screen coordinates } {-----------------------------} PostMessage(GlobData^.ActiveHandle, WM_APP+2, Pt.X, Pt.Y); {-----------------------------} { Send the window coordinates } {-----------------------------} ClientPt := Pt; ScreenToClient(hwnd, ClientPt); PostMessage(GlobData^.ActiveHandle, WM_APP+3, ClientPt.X, ClientPt.Y); end; end; {-----------------------------------------------} { Call the next hook in the chain } {-----------------------------------------------} Result := CallNextHookEx(0, Code, wParam, lParam); end; function InstallMouseHook (Wnd: HWND): Boolean; stdcall; begin Result := False; if (GlobData = nil) then Exit; if (GlobData^.THook = 0) then begin GlobData^.THook := SetWindowsHookEx(WH_MOUSE, @MouseHook, HInstance, 0); if GlobData^.THook = 0 then Exit; end; GlobData^.ActiveHandle := Wnd; Result := True; end; function UninstallMouseHook: Boolean; stdcall; begin Result := True; if (GlobData = nil) then Exit; if (GlobData^.THook <> 0) then begin if not UnhookWindowsHookEx(GlobData^.THook) then Exit; GlobData^.THook = 0; end; GlobData^.ActiveHandle := 0; Result := True; end;
  3. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    I found that horizontal or vertical scroll triggers differently from the little arrows !!!!
  4. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Uwe Raabe I took your last basics and left only the old SyncLink (see zip) and all work including mouse scroll P.S I tested your SyncLink and it messed the mouse BUT I FOUND THAT The little arrows on the horizontal scroll do not work They trigger SyncLink Everything else works like a charm and that is on Windows 7!!! MemoScrol.zip
  5. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    I use the scroll bars,Home,end,all arrows ,Page up and down ALL WORK ON MY LAST ZIP In All your software guys all keys did not work but mouse weel did. In my case all keys work except mouse weel. I tested all your versions. So may be you can take my solution and fix it for the mous weel? I guss windows version do give a problem but why my version work?
  6. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Uwe Raabe Checked yours and the horizontally does not work. It seems that my last zip is the only one except mouse wheel
  7. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    I suspect that if a customer of yours will come and say on one computer it works on another it does not what will you do?
  8. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    I do not know what to say see moving horizontally Obviously, something is fishy unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TLinkMemo = class(TMemo) private FLinkedMemo: TLinkMemo; procedure SyncLink; protected procedure WndProc(var Message: TMessage); override; public property LinkedMemo: TLinkMemo read FLinkedMemo write FLinkedMemo; end; TMemo = class(TLinkMemo); TForm1 = class(TForm) Memo1: TMemo; Memo2: TMemo; procedure FormCreate(Sender: TObject); private public end; var Form1: TForm1; implementation {$R *.dfm} procedure TLinkMemo.WndProc(var Message: TMessage); begin inherited; if (LinkedMemo = nil) or not LinkedMemo.HandleAllocated then Exit; case Message.Msg of WM_HSCROLL, WM_VSCROLL, WM_KEYDOWN, WM_MOUSEFIRST..WM_MOUSELAST: SyncLink; end; end; procedure TLinkMemo.SyncLink; procedure UpdateScrollBar(BarFlag: Integer; Msg: Cardinal); var scrollInfo: TScrollInfo; begin scrollInfo.cbSize := SizeOf(scrollInfo); scrollInfo.fMask := SIF_POS; if GetScrollInfo(Handle, BarFlag, scrollInfo) then LinkedMemo.Perform(Msg, MAKEWPARAM(SB_THUMBPOSITION, scrollInfo.nPos), 0); end; var savedLink: TLinkMemo; begin savedLink := LinkedMemo.LinkedMemo; try LinkedMemo.LinkedMemo := nil; UpdateScrollBar(SB_HORZ, WM_HSCROLL); UpdateScrollBar(SB_VERT, WM_VSCROLL); finally LinkedMemo.LinkedMemo := savedLink; end; end; procedure TForm1.FormCreate(Sender: TObject); begin Memo1.LinkedMemo := Memo2; Memo2.LinkedMemo := Memo1; end;  end.
  9. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    Window 7. With my Zip it works OK
  10. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Kryvich Still no horizontal
  11. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Uwe Raabe In my case I tried to add procedure WndProc(var Message: TMessage);message WM_MOUSEWHEEL; procedure TLinkMemo.WndProc(var Message: TMessage); var i:Integer; begin inherited; if Message.Msg=WM_MOUSEWHEEL then begin begin disable2:=True; SyncLink(true,TWMMouseWheel(Message).Pos); end; // i:= TWMMouseWheel(Message).WheelDelta; end end; and disable carpos in SyncLink; if disable2 then saveLink.CaretPos := p<< came from mouse wheel else saveLink.CaretPos := CaretPos; calling SyncLink(true,TWMMouseWheel(Message).Pos); but I found out that SyncLink; came before the mouse wheel (because of CNCommand) I tried to detect if the mouse wheel inside SyncLink; but could not.
  12. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Kryvich Sorry Back to the drawing board. The Horizontal move does not work It seems to be a better solution fix the horizontal move Mouse wheel workers too I am a good debugger at list
  13. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    Ok all keys work 1. While using the page up or down there was a need to disable DoScroll . while using SyncLink do not use DoScroll 2. I had to add saveLink.Perform(EM_SETSEL, 0, myLine - linkLine); otherwise, the page up or down was not synchronized and text was not shown correctly I hope I did a good job while enjoying to play with it Who said he wants to move to AI. So let AI do this job P.S. Mouse weel dose not work on this program. If anyone wants to keep playing with this I finished MemoScrol.zip
  14. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    Ok guys this zip tested On all keys Home, end, arrow up down left and right, scroll up scroll down, and left and right ALL WORK But Someone fix the Page up or down I mixed the 2 versions and now lastly needed to fix the above I think it would be nice if the cursor position were shown on both memos MemoScrol.zip
  15. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    With the above new software, I succeeded in doing the above screen The older version (my zip ?) worked better
  16. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    I have added if Message.NotifyCode = (EN_VSCROLL {or EN_HSCROLL}) then SyncLink; if Message.NotifyCode = EN_HSCROLL then SyncLink; OR did not work but still does not work I guess we need to catch the line character position too TLinkMemo.SyncLink has to deal with line change and character position
  17. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    @Uwe Raabe Tested and up and down keys work but not the left and right or HOME and END keys to be perfect D10.2.3 MemoScrol.zip
  18. limelect

    Problem using SpinEditEx in Delphi 12.1

    @Anders Melander Why are you not polite? and besides the guy says he works for years Sorry it bothers me
  19. limelect

    How do I synchronize two TMemo scrolling? [Solved]

    Great but out of curiosity I added procedure WMVScroll(var Message: TMessage); message WM_VSCROLL; procedure WMHScroll(var Message: TMessage); message WM_HSCROLL; @JohnLM But not with arrow up or down
  20. limelect

    BIG changes

    Well sorry to say that my opinion is different. I have been with Delphi since #1 and before that (even with assembler) I still actively work with coding all day and I do not see myself getting code from a machine (computer) I love my work and enjoy coding which gives me a lot of satisfaction when I achieve my goal. Brean quizzing is the ultimate
  21. limelect

    A TComboBox alternative not based on WinAPI

    @ThomasRiedelDk It has BetterComboBox.Text:='abc'; this is a find in the list As for that, I made an issue on GitHub
  22. limelect

    [Open Source] Delphi Youtube Downloader

    Enjoy https://limelect.com/downloads/youtube_downloader_shell/
  23. Use pip on command line for example pip install pandas
  24. Ok, I tried to fix all values of newer Delphi but got stacked as too much work; on file ccTextFile line 335 no s:= Stream.ReadStringA(1024*KB); so I do not feel like going on. P.S. I fixed 4 files by now but stopped. So good luck.
  25. It seems you don't read carefully still missing cbAppDataFmx Well I do not presume to be the debugger OK it seems you added the file later But now you use newer Delphi and mine is 10.2.3 so good luck. There are out there even Delphi 5 Stop guys using NEW (above 10) as not everybody has the luxury of buying every year a new Delphi. P.S I have been with Delphi since #1
×