Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hidden panel

Posted on 2003-11-04
3
Medium Priority
?
233 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 90 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

715 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