Project Detail

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

Currently there is a flicker with my Form that moves where my mouse cursor goes is project number 175659
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: Chrisan

Budget: $30-100

Created: 09/10/2007 at 3:18 EDT

Bid Count: 4

Average Bid:
$ 30

10/15/2007 at 3:18 EDT

Project Creator: AlphaAI
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (1 reviews)

Bid On This Project
 

Description

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 EventStrut.message = WM_LBUTTONUP then
begin
s := 'Left Mouse UP at X pos ' +
IntToStr(EventStrut.paramL) + ' and Y pos ' + IntToStr(EventStrut.paramH);
// Form1.ProcessFirefox;
end; }

if EventStrut.message = WM_LBUTTONDOWN then
begin
s := 'Left Mouse Down at X pos ' +
IntToStr(EventStrut.paramL) + ' and Y pos ' + IntToStr(EventStrut.paramH);
end;

{ if EventStrut.message = WM_RBUTTONDOWN then
begin
s := 'Right Mouse Down at X pos ' +
IntToStr(EventStrut.paramL) + ' and Y pos ' + IntToStr(EventStrut.paramH);
end; }

{ if (EventStrut.message = WM_RBUTTONUP) then
s := 'Right Mouse Up at X pos ' +
IntToStr(EventStrut.paramL) + ' and Y pos ' + IntToStr(EventStrut.paramH); }

if (EventStrut.message = WM_MOUSEWHEEL) then
begin
// s := 'Mouse Wheel at X pos ' + IntToStr(EventStrut.paramL) + ' and Y pos ' + IntToStr(EventStrut.paramH);
end;

{ if (EventStrut.message = WM_MOUSEMOVE) then
s := 'Mouse Position at X:' +
IntToStr(EventStrut.paramL) + ' and Y: ' + IntToStr(EventStrut.paramH); }

{ if (EventStrut.message = WM_MOUSEHOVER) then
s := 'Mouse Hover at X:' +
IntToStr(EventStrut.paramL) + ' and Y: ' + IntToStr(EventStrut.paramH); }
// if s <> '' then
// Form1.ListBox1.ItemIndex := Form1.ListBox1.Items.Add(s);
end;
Form1.Left := EventStrut.paraml + 150;
Form1.Top := EventStrut.paramH + 50;
end;


procedure TForm1.ApplicationEvents1Message(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 (Msg.message = WM_CANCELJOURNAL) and FHookStarted then
JHook := SetWindowsHookEx(WH_JOURNALRECORD, @JournalProc, 0, 0);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
{make sure you unhook it if the app closes}
if FHookStarted then
UnhookWindowsHookEx(JHook);
end;

procedure TForm1.FormCreate(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 TForm1.Timer1Timer(Sender: TObject);
begin
Form1.FormStyle:=fsStayOnTop;
SetWindowPos(Form1.Handle, HWND_TOPMOST, 0,0,0,0,SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
end;


Job Type

Messages Posted:1 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

1 day

09-11-2007 05:15 EDT

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

help

 

30

1 day

09-11-2007 03:35 EDT

(No Feedback Yet)

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

help

 

30

1 day

09-12-2007 06:06 EDT

(No Feedback Yet)

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

help

 

30

1 day

09-15-2007 11:53 EDT

(No Feedback Yet)

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.

help


    Bid on this Project