@jacky-12 I understand that but that is not what I need. Let me see if I can explain it better. I have a workspace and add several forms to it. In each for i have different controls as textboxes, buttons, gridviews, etc. The thing is that I want to be able to switch between forms with some key combination (i.e. Ctrl + Tab) but the keypress event depends on the control that has the focus and not on the tabstrip or the workspace. So how can I "get" the keypress regardless the control or object that has the focus.
Is there another way of doing this? Thanks. Marcel jacky-12 wrote: > > Le mercredi 25 février 2009 18:03:29 Vackoy, vous avez écrit : >> Yes, but which element/object is the observer for the Keypress? >> I tried with Workspace.Keypress but when I open a form, the observer >> becomes the form and not the workspace, so no matter what key I press it >> doesn't raise the event... >> >> M0E Lnx wrote: >> > Have not tried it but I imagine you can code that in the >> > windows_Keypress() event. >> > Should be doable > > As Moe told to you, you can use windows_Keypress() event > > EX. suppose you have two textbox named textbox1 and textbox2 declared in > group > tbox with tag 1 & 2. > This procedure below show you how going textbox1 to textbox2 and textbox2 > to > textbox1. > > PUBLIC SUB Tbox_KeyPress() > IF Key.code = Key.enter OR Key.code = Key.Return OR Key.code = Key.Tab > THEN > SELECT CASE LAST.tag > > CASE 1 > Textbox2.SetFocus > STOP EVENT > > CASE 2 > Textbox1.SetFocus > STOP EVENT > endif > end > > I hope that it is it that you want > > Jacky > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://www.nabble.com/Switching-between-forms-in-tabstrip-tp22206694p22207784.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user