Clipper conversion

Moderator: Rathinagiri

Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Clipper conversion

Post by Templar »

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: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Clipper conversion

Post by Anand »

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
Regards,

Anand

Image
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Clipper conversion

Post by esgici »

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: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Clipper conversion

Post by Templar »

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: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Clipper conversion

Post by serge_girard »

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
There's nothing you can do that can't be done...
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Clipper conversion

Post by edk »

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: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Clipper conversion

Post by Templar »

You, Sir, are a genius! That works perfectly. Thank you.
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Clipper conversion

Post by Templar »

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: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Clipper conversion

Post by serge_girard »

Alan,

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

Serge
There's nothing you can do that can't be done...
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Clipper conversion

Post by edk »

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