Article View: borland.public.delphi.winforms.controls.using
Article #448SendMessage - WM_CHAR
From: Mike
Date: Wed, 15 Jun 2005 13:24
Date: Wed, 15 Jun 2005 13:24
21 lines
1647 bytes
1647 bytes
Hi,
I have a form where there are at least two controls in no parent/owner -
child relationship.
It's about a TDBGrid and a TDateTimePicker.
The quest is to drop the TDateTimePicker drop-down list in a programmatic
way.
More specific: when an event of type OnKeydown occurs at the TDBGrid level,
this should force the drop-down list of TDateTimePicker control to drop.
I thought of sending a message to TDateTimePicker control across
"SendMessage" but there are some questions:
1. What value should have the fourth parameter (lParam) of SendMessage in
order to "inform" the control that Alt key is pressed
2. Is it enough to send below message in order to have the drop-down list
dropped:
"SendMessage(lDateTimePicker.Handle, WM_CHAR, word(Key), 0);"?
I should add that this happens in an OnKeyDown event.
I'd be grateful to anyone who will suggest a better way!
Mike
Technical Details
Message-ID:
<42b02bfd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,8d14fedff9665014 X-Google-Attributes: gid1eff29,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mike" <tech_mmv@yahoo.com> Newsgroups: borland.public.delphi.winforms.controls.using Subject: SendMessage - WM_CHAR Date: Wed, 15 Jun 2005 15:24:04 +0200 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 NNTP-Posting-Host: 81.116.217.209 Message-ID: <42b02bfd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118841853 81.116.217.209 (15 Jun 2005 06:24:13 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail