I've used SendKey quite a bit, but can't figure out how to send Alt + Tab (Windows change screen combination)
*This post is locked for comments
Try below Code
IF ISCLEAR(WSHShell) THEN
CREATE(WSHShell);
WSHShell.SendKeys('%{Tab}');
Thanks for the reply, Mohana, but it's not doing what I need it to. I'm not sure whether the combination is wrong or there's something else involved.
We created a sub-card for the sales quote subform(strange, I know, but we have reasons). When I change the quantity field value on the sub-card it switched the windows focus to the Sales Quotes Card or subform . (Alt+Tab) takes us back to the sub-card. We could run the sub card modally which will prevent the behavior, but the customer wants to be able to flip around the product while having the sub-card open.
My thought was to use SendKey to buffer the (Alt+Tab) in the Quantity onValidate in the sub-card. It's either clearing the buffer when the other page gets focus or ('%{Tab}') isn't the right combination.
Any ideas are appreciated.
As you said your case is different.
but I am sure that combinations are correct and they are working fine.
I have to spend some time to create your scenario.
Is manual Alt+Tab working as you expected?
What is happening with the below code?
Where is the cursor moving from new sub-card to?
Manual Alt+Tab works fine. There is no effect from the code you sent which is why I'm thinking that the keyboard buffer is getting cleared when the Quote page gets focus. The cursor will move back to whatever field was last in focus when either page was active.
I created the subcard by first copying the quote subform(page 95) and then changing it to a card. I call it with an event I added to page 95 which uses Page.RUN(PageNo, SalesLineRef)
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Alexander Ermakov 2
SC666 1