Keeping Focus on a Form

Using (or providing) components based on the "Win32" framework

Keeping Focus on a Form

Postby paulmansour on Thu Feb 25, 2010 3:58 pm

Hi all,

I have a form that behaves as a wizard. From the user's perspective it is modal, but it is []DQ'ed repeatedly by the calling function. For example:

Code: Select all
code
[]DQ, wait on form
code
[]DQ wait on form
code
etc...


My problem is that the wizard flashes between pages as forms in the background are brought to the front for a moment between calls to []DQ. Explicity setting the focus to the wizard form after the DQ does seem to prevent the problem.

Any advice is welcome.
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm

Re: Keeping Focus on a Form

Postby paulmansour on Thu Feb 25, 2010 4:04 pm

Interestingly enough, I just noticed that when a strickly modal message box is displayed and then dismissed during the course of the wizard, from that moment on , the focus stays on the wizard and does not flash back to the background form.
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm

Re: Keeping Focus on a Form

Postby AndyS|Dyalog on Fri Feb 26, 2010 1:05 pm

⎕dq is designed to return the focus to where it was immediately before the ⎕dq started.

One thing to try would be to expicitly set the focus on the form immediately before the ⎕dq starts .. does that improve things ?
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm

Re: Keeping Focus on a Form

Postby paulmansour on Sat Feb 27, 2010 3:41 pm

Andy, thanks for the tip, but setting the focus doesn't help. However, a little more investigation reveals my problem does not occur in the runtime version, so it probably has to do with []DQ interacting with the session, which is really no problem for me as all I care about is the end user's experience in the production, runtime, product. So I'm good. Thanks for your help.
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm


Return to Windows: GUI, COM/OLE/ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest