Clipper conversion

Moderator: Rathinagiri

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Clipper conversion

Post by Templar » Mon Apr 02, 2018 11:23 am

Hello everyone. This is my first posting so forgive me if I'm getting it wrong. I am using HMG to update an ancient Clipper 5.2 application. Most of it works pretty well, but I am hitting one major problem. Who / where is the best palce to ask about this?

User avatar
Anand
Posts: 381
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF
Has thanked: 102 times
Been thanked: 52 times

Post by Anand » Mon Apr 02, 2018 12:40 pm

Templar wrote:
Mon Apr 02, 2018 11:23 am
Who / where is the best palce to ask about this?
Welcome,

Who := All
Where := Here

Just post your query, to get solution, before the ink dries :)

Regards,

Anand
Image

User avatar
esgici
Posts: 4503
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 382 times
Been thanked: 111 times
Contact:

Post by esgici » Mon Apr 02, 2018 12:46 pm

Templar wrote:
Mon Apr 02, 2018 11:23 am
... Who / where is the best place to ask about this?
You are welcome :)

Answer is in perhaps no best but a better place :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Mon Apr 02, 2018 1:06 pm

Ok: here goes. This is either an FAQ or weird.

The application opens fine in a medium window, but as soon as any new data is input and <Return> is pressed, it moves the screen up out of sight. Eg:
* Trial program
*
PROCEDURE MAIN
REQUEST HB_GT_WIN_DEFAULT
CLS
@1,1 TO 23,78 DOUBLE
ANS:=" "
@12,12 SAY "How are you?"
@12,25 GET ANS
READ
RK:=INKEY(0)
RETURN
Any suggestions?

User avatar
serge_girard
Posts: 2283
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 544 times
Been thanked: 115 times
Contact:

Post by serge_girard » Mon Apr 02, 2018 1:13 pm

Hi Templar,

Welcome from Belgium.

Maybe this helps:

Code: Select all

#include "hmg.ch"
PROCEDURE MAIN
REQUEST HB_GT_WIN_DEFAULT
CLS
@1,1 TO 23,78 DOUBLE
ANS:=" "
@12,12 SAY "How are you?"
@12,25 GET ANS
READ
//RK := INKEY(0)
? ans
wait""
RETURN 
Serge

edk
Posts: 450
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 134 times
Been thanked: 370 times

Post by edk » Mon Apr 02, 2018 3:16 pm

Hello Templar,
Greetings from Poland.

In my opinion, this should solve your issue:

Code: Select all

PROCEDURE MAIN
REQUEST HB_GT_WIN_DEFAULT
SetMode(25,80)
CLS
@1,1 TO 23,78 DOUBLE
ANS:="      "
@12,12 SAY "How are you?"
@12,25 GET ANS
READ
RK:=INKEY(0)
RETURN
Edward.

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Tue Apr 03, 2018 7:58 am

You, Sir, are a genius! That works perfectly. Thank you.

Templar
Posts: 30
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 1 time
Been thanked: 1 time

Post by Templar » Tue Apr 03, 2018 8:07 am

Hi Serge,
Thanks for that suggestion, but in fact Edk's solution worked better. Thanks for the help, though.

As a amtter of interest, you suggest including "hmg.ch" What is in that?

User avatar
serge_girard
Posts: 2283
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 544 times
Been thanked: 115 times
Contact:

Post by serge_girard » Tue Apr 03, 2018 8:25 am

Alan,

You will need hmg.ch in every program you will compile with the HMG IDE. These are definitions for HMG.

Serge

edk
Posts: 450
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 134 times
Been thanked: 370 times

Post by edk » Tue Apr 03, 2018 12:01 pm

Templar wrote:
Tue Apr 03, 2018 7:58 am
You, Sir, are a genius! That works perfectly. Thank you.
Please, do not call me Sir, because I haven't been honored by Queen Elizabeth II :lol:
Just Edward.
And I'm not a genius, it's just usual experience.

Edward.

Post Reply