Can the focus on a Form be controlled by a program?

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Can the focus on a Form be controlled by a program?

Postby ArrayMac227 on Tue Nov 14, 2017 4:10 pm

Examples would be appreciated....
ArrayMac227
 
Posts: 35
Joined: Sat Sep 12, 2015 1:40 pm

Re: Can the focus on a Form be controlled by a program?

Postby paulmansour on Tue Nov 14, 2017 4:56 pm

Try:

Code: Select all
⎕NQ Object 'GotFocus'


Where object is the name of the form.
paulmansour
 
Posts: 246
Joined: Fri Oct 03, 2008 4:14 pm

Re: Can the focus on a Form be controlled by a program?

Postby ArrayMac227 on Fri Nov 17, 2017 9:39 pm

Knew that already... are there other means?

In the expression I use, my 'Object' is a Button. Is that a problem?
ArrayMac227
 
Posts: 35
Joined: Sat Sep 12, 2015 1:40 pm

Re: Can the focus on a Form be controlled by a program?

Postby kai on Sun Nov 19, 2017 9:04 am

You ask a question, get an answer and then point out that you knew already.

Who else is going to answer I wonder.
User avatar
kai
 
Posts: 83
Joined: Thu Jun 18, 2009 5:10 pm
Location: Stevenage, UK

Re: Can the focus on a Form be controlled by a program?

Postby Vince|Dyalog on Mon Nov 20, 2017 9:56 am

Hi ArrayMac227,

You could also do it with ⎕NA and the win32 windows function.

      'f' ⎕WC 'form'
'f.b' ⎕WC 'button'
⎕NA 'P user32.dll|SetFocus P'
r←SetFocus f.e.Handle


Regards,

Vince
Vince|Dyalog
 
Posts: 261
Joined: Wed Oct 01, 2008 9:39 am


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest