Dear friends, is there a way to set a specific starting function (ie. different from the first function of the first PRG)?
Dear friends, is there a way to set a specific starting function (ie. different from the first function of the first PRG)?
Enrico, tengo entendido que harbour busca una funci贸n llamada Main.
Ahora s铆 mal no recuerdo usando hbmk2 puedes indicar el nombre de una funci贸n que ser谩 tratada como el punto de ingreso de la app en lugar de Main.
Puedes ver la ayuda extendida de hbmk2 para ver cu谩l es ese par谩metro.
Thank you. And for xHarbour?
Enrico, INIT PROCEDURE does not work for you?
Can you show me a sample, please?
INIT PROCEDURE MainInit()
LOCAL cTitle 聽:= "FiveWin TGrid Listview Demo " + cVersion
LOCAL hWndDlg := FindWindowEx(,,, cTitle )
聽 聽IF !( hWndDlg == 0 )
聽 聽 聽 SetForegroundWindow( hWndDlg )
聽 聽 聽 BringWindowToTop( hWndDlg )
聽 聽 聽 ShowWindow( hWndDlg, 1 )
聽 聽 聽 UpdateWindow( hWndDlg )
聽 聽 聽 QUIT 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // It is a second instance. Bye Bye
聽 聽ENDIF
RETURN
PROCEDURE Main()Thank you, but this is not what I'm asking for. I have many PRGs and a function MAIN() inside one of those (not the first linked). How can I force the function MAIN() to be executed as the first function?
Enrico Maria Giordano wrote:Thank you, but this is not what I'm asking for.you ask for a Sample using INIT PROCEDURE
Enrico Maria Giordano wrote:I have many PRGs and a function MAIN() inside one of those (not the first linked).put you file with MAIN as 1st into your *,MAK or *,HBP
How can I force the function MAIN() to be executed as the first function?
My request was specific: use a starting function that is not in the first module.
Dear Enrico,
You could place a INIT PROCEDURE in the main file and then call a function from another module from it
Yes, I already thought about that but I'm not sure it is a good working solution. In fact, all the program would be executed inside the INIT PROCEDURE, that is not a good thing, I suppose.
hbmk2 -hhhopen the help file of hbmk2 with parameters in notepad
...
-main=<mainfunc> sustituye el nombre de la funci贸n o procedimento inicial
...
Antonio Linares wrote:It should work fine, please try it :-)Ok, I'll try, thank you.
It is just one more stack call
carlos vargas wrote:usingThis is only for Harbour, not for xHarbour, right?hbmk2 -hhhopen the help file of hbmk2 with parameters in notepad...
-main=<mainfunc> sustituye el nombre de la funci贸n o procedimento inicial
...