Le 22/03/2012 10:30, Cogier a écrit :
> Benoît,
>
> I am using Gambas 2.21 and tried the code below but I still get nothing when
> pressing the keyboard, in fact the SUB does not seem to be called at all.
>
> What am I missing?
>
> Thanks,
>
> Charlie Ogier
>
> ' Gambas class file
>
> PUBLIC SUB Form_Open()
> FMain.Show
> END
>
> PUBLIC SUB Application_KeyPress()
>
>     PRINT "Key";; Key.Code;; "'"; Key.Text; "' has been pressed."
>     PRINT "Was here"
>
> END

Hello Charlie,

i think your mistake comes from the name of event manager.
You want to call the _KeyPress() event but from which control?

Furthermore, you're calling FMain.Show but once again, are there
two windows into your project? if you have one window (the main form)
you don't have to call it.

For me the name : "Application_"  is a static class that gives you 
information
about your program. And this one has only one special event named 
"_Read()" .

-- 
François Gallo


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to