Solved

Hidden panel

Posted on 2003-11-04
3
228 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
3 Comments
 
LVL 24

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now