making modal a modeless form

I need to create a modeless form and then to make it modal for a while.

I wrote a procedure FakeShowModal to "make modal" a modeless form,
the procedure looks as follows:

procedure FakeShowModal(Form: TMyForm);
var
 msg: TMsg;
begin
 Form.AllowedToClose := False;
 while not (Form.AllowedToClose) do
 begin
  while (PeekMessage(msg, Form.handle, 0, 0, PM_REMOVE)) do
  begin
   TranslateMessage(msg);
   DispatchMessage(msg);
  end;
 end;
end;

when I need to leave the "modal status" I set AllowedToClose to True.

This will need an explicit handling for TAB and Shift-TAB but it is
exactly what I needed beacuse I wanna have the same handling for TAB
and Arrow-Down and for Shift-TAB and Arrow-Up.

I have still a problem: when I move the mouse on a Control with an Hint
the Hint is not displayed, how can I detect the "activate hint" event.?

-
Seiper Sistemi s.a.s. - V.S.Antonio da Padova, 1
Torino - Italy
e-mail gilb...@mbox.vol.it