🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #79

Re: Popupmenu

#79
From: H. Debs
Date: Mon, 26 Jan 2004 00:03
29 lines
1860 bytes
"Glenn De Tollenaere" <gdt@nospam.com> wrote in message
news:40112914$1@newsgroups.borland.com...
> Hi all,
>
> is there a way to know whether a certain popupmenu is open (dropped
down) by
> using code ?
> If so, is there a way to close it too ?
>
> Thanks for any help,
> Glenn
>

Popupmenu has an OnPopup event which fires when the popup menu opens.
You could use that to set a var indicating that the menu is open.  You
can close any popup menu as Peter told you, or also using:
  Postmessage(Form.Handle, WM_NCLBUTTONDOWN, 0, 0);
  Postmessage(Form.Handle, WM_NCLBUTTONUP, 0, 0);

However, there is no ready-made way for you to know if the popup menu
is still open when you need to ask that question, i.e. you do not get
informed when the popup menu closes.

I have written a PopupMenuCatcher component which tells you via an
event when a (any) popup menu opens and also when any popupmenu
closes.
Would that be useful to you?

Habib
Technical Details
Message-ID: <40145962@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40112914$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,581c8f93130b4a93
X-Google-Attributes: gid109d30,public
X-Google-ArrivalTime: 2004-01-25 16:07:58 PST
From: "H. Debs" <no@spam.com>
Newsgroups: borland.public.delphi.language.objectpascal
References: <40112914$1@newsgroups.borland.com>
Subject: Re: Popupmenu
Date: Mon, 26 Jan 2004 01:03:41 +0100
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 217.128.27.251
Message-ID: <40145962@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075075426 217.128.27.251 (25 Jan 2004 16:03:46 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail