Solved

Hidden panel

Posted on 2003-11-04
3
231 Views
Last Modified: 2010-05-18
I have a project which has a main form controling various events linked to a TTimer component set for 1 second.
The main form has a button which calls another form which has various panels on it. The user can move the mouse over a panel to bring up a second hidden panel using the following procedures

procedure TForm2.CMMouseEnter(var Message: TMessage);
begin
 if Message.LParam = Integer(panel1) then
     Panel2.Visible := true;
end;

procedure TForm2.CMMouseLeave(var Message: TMessage);
begin
 if Message.LParam = Integer(panel1) then
     Panel2.Visible := False;
end;

However as soon as the TTimer on the main form is enabled the above procedure doesnt work

Can anyone help?
0
Comment
Question by:Al_Shepstone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 9679260
What does the TTimer Event do ?

Regards,
  Tomas Helgi
0
 

Author Comment

by:Al_Shepstone
ID: 9679590
It is a timer which can call procedures at various intervals ie every second.
0
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 30 total points
ID: 9680544
It's not a good decision to put long time procedures in OnTimer.
Use a thread instead.

To solve your problem use Application.ProcessMessages.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 90
Convert GUI app into console app for Win32 Env 5 133
FMX and jaudiotracker playing memory stream 29 107
DBGrid or StringGrid ? 6 133
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question