Page 3 of 7

Re: Migration from HMG to HMG Minigui

Posted: Tue Mar 29, 2022 2:30 pm
by serge_girard
Grigory,

Is there some list with 'differences' and how to change to alternate syntax or whatever.


Serge

Re: Migration from HMG to HMG Minigui

Posted: Tue Mar 29, 2022 5:36 pm
by Claudio Ricardo
serge_girard wrote: Tue Mar 29, 2022 2:30 pm Grigory,

Is there some list with 'differences' and how to change to alternate syntax or whatever.


Serge
+1
I join the request again, I had already done it when (I think Jimmy) requested it a while ago.

Re: Migration from HMG to HMG Minigui

Posted: Tue Mar 29, 2022 6:13 pm
by AUGE_OHR
hi,

i have "try" to write a Memo what is need to "translate" HMG into MiniGUI Extendet Version

but it is a "long" Memo and still incomplete ... and not all what i wrote is "correct" ( found later other Way)
i attach my Memo, hope it help you
HMG2EXT.ZIP
(1.98 KiB) Downloaded 364 times

Re: Migration from HMG to HMG Minigui

Posted: Tue Mar 29, 2022 6:28 pm
by serge_girard
Thanks Jimmy and Claudio,

I had much trouble at start but thanks to Grigory resolved. Now testing and some coding is not working yet
(aFrmList := _HMG_SYSDATA [66]) but I have commented the ones that gave problem and now real testing can begin...
But overall fast and easy migration, again MANY thanks to Grigory (and Marc at start!)

Serge

Re: Migration from HMG to HMG Minigui

Posted: Wed Mar 30, 2022 6:41 am
by gfilatov
serge_girard wrote: Tue Mar 29, 2022 2:30 pm Grigory,

Is there some list with 'differences' and how to change to alternate syntax or whatever.
Serge,

Yes, of course.
We have the 'Harbour MiniGUI Extended Syntax Extensions' list in the file exdiff.txt in folder \Minigui\Doc :arrow:

IMHO The above file is slightly outdated due to the recent Minigui modifications. :lol:

Re: Migration from HMG to HMG Minigui

Posted: Wed Mar 30, 2022 7:00 am
by serge_girard
Thanks Grigory ! So much to see and learn.....

Serge

Re: Migration from HMG to HMG Minigui

Posted: Wed Mar 30, 2022 11:07 am
by serge_girard
Grigory,

One more question:

I now have a working program! ONE matter remains:

I used to start my programs from within a .BAT file which deletes a few working files etc.
and finally calls my program with a parameter.

This is done by a shortcut on the desktop which calls the BAT file in its working directory.
Then a DOS screen is opened and then my application is openend (2 screens!). These 2 screen remains
until one of them is closed. Closing (with X) the DOS screen will also close my application.
In my application the closing with X is prohibited (ON INTERACTIVECLOSE) and closing must be done
by pressing ESC which will do some extra tests before closing.

In HMG the DOS screen is opened, my application is openend and the DOS screen closes and then there is
only one way to close the application: ESC

So how to get rid of this DOS screen!
In HMG REQUEST HB_GT_WIN_DEFAULT would do the DOS thing...

Serge

Re: Migration from HMG to HMG Minigui

Posted: Wed Mar 30, 2022 3:15 pm
by andyglezl
Hi Serge
Hace mucho tiempo yo convertía los .Bat en .Exe y me funcionaba
pero no recuerdo que programa era.

Tal vez este te sirva...
*-------------------------------------------------------------------------------------
hi serge
A long time ago I converted the .Bat to .Exe and it worked for me
But I don't remember what program it was.

Maybe this will help you...

https://bat2exe.net

Re: Migration from HMG to HMG Minigui

Posted: Thu Mar 31, 2022 12:17 am
by AUGE_OHR
hi Serge,
serge_girard wrote: Wed Mar 30, 2022 11:07 am I used to start my programs from within a .BAT file which deletes a few working files etc.
and finally calls my program with a parameter.
call a *.BAT using a *.LNK will default open DOS-BOX
but you can change DOS-BOX to "minimize"

Attached my DXE_CreateLNK() where you have access to

Code: Select all

   oShellLink:ShowCommand
DXE_CreateLNK.ZIP
(967 Bytes) Downloaded 322 times
---

other Way is a small "Starter-EXE" using ShellOpenFile() API

Code: Select all

PROCEDURE MAIN(,cApp,cParameter)

   IF FILE(cApp)
      ShellOpenFile(cApp,,cParameter)  
      ...

Code: Select all

FUNCTION SHELLOPENFILE( cPath, cFILE, cPara, cHome )
      ... 
      lSuccess := ShellExecute( 0, ;
                                "open", ;
                                cPath + cFILE, ;
                                cPara, ;
                                cHome, ;
                                SW_HIDE )  // default SW_NORMAL

Re: Migration from HMG to HMG Minigui

Posted: Thu Mar 31, 2022 7:57 am
by serge_girard
It seems that START application followed by EXIT will START my APP.EXE and then force the DOS screen to close.

Code: Select all

DEL  C:\MYFOLDER\SOMEFILES..
START C:\MYFOLDER\MYAPP somePARAMETER
EXIT
This is what I want! Thanks all for helping!

DXE_CreateLink is very interesting!

I use some similar code:

Code: Select all

LOCAL WshShell		:= CreateObject("WScript.Shell")
LOCAL DesktopFolder	:= WshShell:SpecialFolders("Desktop")
LOCAL xDEFAULT                := ALLTRIM(DISKNAME() + ":\" + CURDIR() )

IF !FILE(DesktopFolder + "\My_App.lnk")
	FileShortcut := WshShell:CreateShortcut(DesktopFolder + "\My_App.lnk")
	FileShortcut:TargetPath		:= xDEFAULT + "\My_App.BAT"
	FileShortcut:Description	:= "My_App"
	FileShortcut:IconLocation	:= xDEFAULT + "\IMAGES\PROJ.ICO, 0"  //Zero is the index
	FileShortcut:WorkingDirectory := xDEFAULT
	FileShortcut:Save()
ENDIF
Serge