Currently there is a flicker with my Form that moves where my mouse cursor goes
$30-100 USD
In Progress
Posted over 16 years ago
$30-100 USD
Paid on delivery
Well here is the existing code that allows the form to follow me where ever my mouse goes.
When ever i type there is flicker. Recognition to Slick812 as this is his code that i found.
I need the flicker to be removed. If you hold down keys or start typing, the form flickers.
public
{ Public declarations }
FHookStarted : Boolean;
var
Form1: TForm1;
JHook: THandle;
function JournalProc(Code, wParam: Integer; var EventStrut: TEventMsg): Integer; stdcall;
var
Char1: PChar;
s: string;
previousy : integer;
Parent : HWND;
ThePoint : TPoint;
TheWindow : HWND;
WindowText : array[0..255] of char;
begin
{this is the JournalRecordProc}
Result := CallNextHookEx(JHook, Code, wParam, Longint(@EventStrut));
{the CallNextHookEX is not really needed for journal hook since it it not
really in a hook chain, but it's standard for a Hook}
if Code < 0 then Exit;
{you should cancel operation if you get HC_SYSMODALON}
if Code = HC_SYSMODALON then Exit;
if Code = HC_ACTION then
begin
{
The lParam parameter contains a pointer to a TEventMsg
structure containing information on
the message removed from the system message queue.
}
s := '';
{ if [login to view URL] = WM_LBUTTONUP then
begin
s := 'Left Mouse UP at X pos ' +
IntToStr([login to view URL]) + ' and Y pos ' + IntToStr([login to view URL]);
// [login to view URL];
end; }
if [login to view URL] = WM_LBUTTONDOWN then
begin
s := 'Left Mouse Down at X pos ' +
IntToStr([login to view URL]) + ' and Y pos ' + IntToStr([login to view URL]);
end;
{ if [login to view URL] = WM_RBUTTONDOWN then
begin
s := 'Right Mouse Down at X pos ' +
IntToStr([login to view URL]) + ' and Y pos ' + IntToStr([login to view URL]);
end; }
{ if ([login to view URL] = WM_RBUTTONUP) then
s := 'Right Mouse Up at X pos ' +
IntToStr([login to view URL]) + ' and Y pos ' + IntToStr([login to view URL]); }
if ([login to view URL] = WM_MOUSEWHEEL) then
begin
// s := 'Mouse Wheel at X pos ' + IntToStr([login to view URL]) + ' and Y pos ' + IntToStr([login to view URL]);
end;
{ if ([login to view URL] = WM_MOUSEMOVE) then
s := 'Mouse Position at X:' +
IntToStr([login to view URL]) + ' and Y: ' + IntToStr([login to view URL]); }
{ if ([login to view URL] = WM_MOUSEHOVER) then
s := 'Mouse Hover at X:' +
IntToStr([login to view URL]) + ' and Y: ' + IntToStr([login to view URL]); }
// if s <> '' then
// [login to view URL] := [login to view URL](s);
end;
[login to view URL] := [login to view URL] + 150;
[login to view URL] := [login to view URL] + 50;
end;
procedure [login to view URL](var Msg: tagMSG;
var Handled: Boolean);
begin
{the journal hook is automaticly camceled if the Task manager
(Ctrl-Alt-Del) or the Ctrl-Esc keys are pressed, you restart it
when the WM_CANCELJOURNAL is sent to the parent window, Application}
Handled := False;
if ([login to view URL] = WM_CANCELJOURNAL) and FHookStarted then
JHook := SetWindowsHookEx(WH_JOURNALRECORD, @JournalProc, 0, 0);
end;
procedure [login to view URL](Sender: TObject; var Action: TCloseAction);
begin
{make sure you unhook it if the app closes}
if FHookStarted then
UnhookWindowsHookEx(JHook);
end;
procedure [login to view URL](Sender: TObject);
begin
if FHookStarted then
begin
ShowMessage('Mouse is already being Journaled, can not restart');
Exit;
end;
JHook := SetWindowsHookEx(WH_JOURNALRECORD, @JournalProc, hInstance, 0);
{SetWindowsHookEx starts the Hook}
if JHook > 0 then
begin
FHookStarted := True;
end
else
ShowMessage('No Journal Hook availible');
end;
procedure [login to view URL](Sender: TObject);
begin
[login to view URL]:=fsStayOnTop;
SetWindowPos([login to view URL], HWND_TOPMOST, 0,0,0,0,SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
end;
Dear Sir,
I have made a solution for you and I will post the solution in PMB, please review that. I am a senior Delphi programmer working for online projects with experiences more than 9 years using Delphi and 19 years in programming. In PMB also I put a list of my past project for your consideration when you need my services in the future.
I have my trust in you Sir, please hire and pay me if you are using my solution for this project.
Best regards
$30 USD in 1 day
5.0 (2 reviews)
2.9
2.9
4 freelancers are bidding on average $30 USD for this job