Window not accepting keystrkes on program start

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
RalphMDS
Posts: 21
Joined: Wed Mar 25, 2009 1:24 pm
Location: New Jersey, U.S.A.

Window not accepting keystrkes on program start

Post 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
When your toolbox only contains a hammer, everything looks like a nail...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Window not accepting keystrkes on program start

Post by esgici »

Hi Ralph
RalphMDS wrote: I have a problem ...
Confirmed. This problem introduced by HMG 2.7.0 :(

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Window not accepting keystrkes on program start

Post by mol »

I thought tat's my guilt...
So, I have the same problem
Marek
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Window not accepting keystrkes on program start

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply