Hi,

2008/1/15, Roberto Padovani <[EMAIL PROTECTED]>:
>
> why don't you call the method FormKeyDown yourself?
> ...
> begin
> ...
>   self.FormKeyDown(self, 65,[ssAlt]);
> ....
> end;


I do not find this method.

R#
>
>
> 2008/1/15, Fabio Dell'Aria <[EMAIL PROTECTED]>:
> > Hi,
> >
> > 2008/1/15, Lee Jenkins <[EMAIL PROTECTED]>:
> > > Fabio Dell'Aria wrote:
> > > > Hi to all,
> > > >
> > > > how I can simulate the "ALT+E" key-press command on a specified
> TForm
> > > > for open its "&Edit" menu?
> > > >
> > >
> > > Fabio, can you try:
> > >
> > > 1. Set TMyForm.KeyPreview := true
> > >
> > > 2. OnKeyDown Event Code:
> > >
> > > procedure TMyForm.FormKeyDown( Sender: TObject; var Key: Word;
> > >    Shift: TShiftState) ;
> > > begin
> > >    if (ssAlt in Shift) and (key = 65) then
> > >      AMenuItem.Click;
> > >
> > >    // or...
> > >    // if (ssAlt in Shift) and (lowercase(Chr(key)) = 'e') then
> > > end;
> > >
> > > I don't do that kind of key capture much so there may be a better way
> to
> > test
> > > for upper or lowercase 'e';
> >
> > Not always this keys open a menu, other times do others.
> >
> > So I cannot call directly the MenuItem.Click method.
> >
> > I need to simply simulate a keypress. How I can do this?
> >
> > > --
> > > Warm Regards,
> > >
> > > Lee
> > >
> > > "The only thing that kept me out college...was high school."
> > >
> > >
> > _________________________________________________________________
> > >      To unsubscribe: mail [EMAIL PROTECTED] with
> > >                 "unsubscribe" as the Subject
> > >    archives at
> > http://www.lazarus.freepascal.org/mailarchives
> > >
> >
> >
> >
> > --
> > Best regards...
> >
> > Fabio Dell'Aria.
>
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
>



-- 
Best regards...

Fabio Dell'Aria.

Reply via email to