Page 1 of 1

Window not accepting keystrkes on program start

Posted: Sat Apr 04, 2009 11:09 pm
by RalphMDS
Hi all,

I have a problem and I am trying to figure out if it is something specific to HMG and if there is a work around.

On my system, when I run an HMG program, the program opens, but the title bar of the main window remains light blue as though it is not active, as opposed to the darker blue that you get when a program is active in the foreground. No keyboard shortcuts work and I can't set focus on a text field until I click somewhere in the program with my mouse.

I observe this behavior in the sample programs as well as my own programs.

Here is a sample program that illustrates this behavior:

#include "minigui.ch"

Function Main

DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
MAIN;

@ 10,10 TEXTBOX Text_1

END WINDOW

ON KEY F2 OF Form_1 ACTION MsgBox('F2 Pressed')

Form_1.Center
Form_1.Activate

Return Nil

If I compile and run the program the F2 key will do nothing until I have clicked on the window. Then it works as expected.

Is there a way around this?

Thanks,

Ralph

Re: Window not accepting keystrkes on program start

Posted: Sun Apr 05, 2009 12:55 pm
by esgici
Hi Ralph
RalphMDS wrote: I have a problem ...
Confirmed. This problem introduced by HMG 2.7.0 :(

Regards

--

Esgici

Re: Window not accepting keystrkes on program start

Posted: Mon Apr 06, 2009 10:25 am
by mol
I thought tat's my guilt...
So, I have the same problem
Marek

Re: Window not accepting keystrkes on program start

Posted: Fri Apr 10, 2009 1:02 am
by Roberto Lopez
RalphMDS wrote:Hi all,

I have a problem and I am trying to figure out if it is something specific to HMG and if there is a work around.
I confirm the problem.

It is related to WAIT WINDOW added in 2.7.0.

I'll publish a fixed version ASAP.

Thanks for reporting!

Regards,

Roberto.