

limelect
-
Content Count
924 -
Joined
-
Last visited
-
Days Won
1
Posts posted by limelect
-
-
VCL spinner
in VCL
2 hours ago, Jud said:ProgressGuage, where I update it periodically to show that a loop is still executing
@Uwe Raabe the above is what he needs
no numbers. There are times when you do not know your process's time(size), so there are times like the above. it is active until you stop it.
This program of mine does exactly his needs. turn until you stop
https://limelect.com/downloads/youtube_downloader_shell/
or
-
VCL spinner
in VCL
TAdvCircularProgress does it . It turns until you stop it.
There are quite a few like it that work until you stop them.
-
No
https://github.com/Andry-Smirnov/RXLib-Delphi
https://blogs.embarcadero.com/rxlib-and-tokyo-compatibility/
Google RXlib Delphi
It is All over and I am still using it on D10.2.3
using unrxlib_275_u_1_0_18
Unofficial version Rx library
for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3/XE4/XE5/XE6/XE7/XE8/Seattle/Berlin
-
RX hase a component just for that
FORMSTORAG
-
-
@Kryvich OK yours work too
Within this zip, you have both versions with (*
Pick your choice
As I was the tester we got to the answer GREAT
-
-
@Uwe Raabe Great all work we can give that as the answer
@Kryvich did not try yours
I wonder what will happen if the text is uneven
It works with very interesting behavior
Just multiply the text on one of the memos.
Great
-
@Uwe Raabe I know the problem but could not find a solution
On the horizontal arrow, you need to move in SyncLink by character
I tried
MyChar := Perform(EM_POSFROMCHAR, 0, 0);
LinkChar:= LinkedMemo.Perform(EM_POSFROMCHAR, 0, 0);
if LinkChar<>MyChar then
LinkedMemo.Perform(EM_SCROLLCARET, 0, ?);
but the char position is not correct one has to find the char position from the line?Any idea?
Furthermore if one scrolls by char he does not scroll by line
P.S. I computerize large companies but this little piece of software helps stay in shape of mind.
-
-
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;
-
I found that horizontal or vertical scroll triggers differently from the little arrows !!!!
-
@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!!!
-
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?
-
@Uwe Raabe Checked yours and the horizontally does not work.
It seems that my last zip is the only one except mouse wheel
-
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?
-
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. -
Window 7.
With my Zip it works OK
-
-
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;
endend;
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.
-
@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
-
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
-
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
-
VCL spinner
in VCL
Posted
I do not know of a component to do that,
If a program is still running that means what?
showing? calculating? finished closed?