Currently there is a flicker with my Form that moves where my mouse cursor goes

Completed Posted Sep 10, 2007 Paid on delivery
Completed 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 [url removed, login to view] = WM_LBUTTONUP then

begin

s := 'Left Mouse UP at X pos ' +

IntToStr([url removed, login to view]) + ' and Y pos ' + IntToStr([url removed, login to view]);

// [url removed, login to view];

end; }

if [url removed, login to view] = WM_LBUTTONDOWN then

begin

s := 'Left Mouse Down at X pos ' +

IntToStr([url removed, login to view]) + ' and Y pos ' + IntToStr([url removed, login to view]);

end;

{ if [url removed, login to view] = WM_RBUTTONDOWN then

begin

s := 'Right Mouse Down at X pos ' +

IntToStr([url removed, login to view]) + ' and Y pos ' + IntToStr([url removed, login to view]);

end; }

{ if ([url removed, login to view] = WM_RBUTTONUP) then

s := 'Right Mouse Up at X pos ' +

IntToStr([url removed, login to view]) + ' and Y pos ' + IntToStr([url removed, login to view]); }

if ([url removed, login to view] = WM_MOUSEWHEEL) then

begin

// s := 'Mouse Wheel at X pos ' + IntToStr([url removed, login to view]) + ' and Y pos ' + IntToStr([url removed, login to view]);

end;

{ if ([url removed, login to view] = WM_MOUSEMOVE) then

s := 'Mouse Position at X:' +

IntToStr([url removed, login to view]) + ' and Y: ' + IntToStr([url removed, login to view]); }

{ if ([url removed, login to view] = WM_MOUSEHOVER) then

s := 'Mouse Hover at X:' +

IntToStr([url removed, login to view]) + ' and Y: ' + IntToStr([url removed, login to view]); }

// if s <> '' then

// [url removed, login to view] := [url removed, login to view](s);

end;

[url removed, login to view] := [url removed, login to view] + 150;

[url removed, login to view] := [url removed, login to view] + 50;

end;

procedure [url removed, login to view](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 ([url removed, login to view] = WM_CANCELJOURNAL) and FHookStarted then

JHook := SetWindowsHookEx(WH_JOURNALRECORD, @JournalProc, 0, 0);

end;

procedure [url removed, login to view](Sender: TObject; var Action: TCloseAction);

begin

{make sure you unhook it if the app closes}

if FHookStarted then

UnhookWindowsHookEx(JHook);

end;

procedure [url removed, login to view](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 [url removed, login to view](Sender: TObject);

begin

[url removed, login to view]:=fsStayOnTop;

SetWindowPos([url removed, login to view], HWND_TOPMOST, 0,0,0,0,SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);

end;

Delphi

Project ID: #175659

About the project

4 proposals Remote project Active Sep 16, 2007

Awarded to:

Chrisan

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 ye More

$30 USD in 1 day
(2 Reviews)
2.9

4 freelancers are bidding on average $30 for this job

lukluk1234

your problem is very easy, please choose me or contact me and i will help u, solve your problem may be 5 minnuts to soleved,ok

$30 USD in 1 day
(0 Reviews)
0.0
mshahbazi

you need my advanced runtime debugger to debug the project, i solved the problem in less than a minute

$30 USD in 1 day
(0 Reviews)
0.0
MLewis

Your task is quite simple. There are two miscoded fragments that should be corrected. I would be glad to provide you with a quick answer.

$30 USD in 1 day
(0 Reviews)
0.0