i have some trobles with Harbour Mini Gui

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

Re: i have some trobles with Harbour Mini Gui

Post by mol »

post fragment of your code, maybe someone can help you...
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by mol »

mol wrote:post fragment of your code, maybe someone can help you...

I sent you e-mail with solve of your problem... Does it works?
rpiccioli
Posts: 17
Joined: Sun Dec 21, 2008 8:43 am
Location: Roma - Italy

Re: i have some trobles with Harbour Mini Gui

Post by rpiccioli »

Oh My God ..

Yes, It works... thank you a lot ...

I read that line a lot of times...

I'm ashamed..

Thank you mol !!!!
--
Riccardo Piccioli
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by mol »

My pleasure....
Sometimes I look for error for long time and can't find it.
The worst errors are stupid...

regards, Marek
rpiccioli
Posts: 17
Joined: Sun Dec 21, 2008 8:43 am
Location: Roma - Italy

Re: i have some trobles with Harbour Mini Gui

Post by rpiccioli »

mol wrote:My pleasure....
Sometimes I look for error for long time and can't find it.
The worst errors are stupid...

regards, Marek
What is the difference in DEFINE WINDOWS between MAIN And Modal?

Because i tryed to adapt a code th stand alone seems to work

Code: Select all

.......
Procedure PBro_Corsi()

	SET CENTURY ON
	SET DELETED ON

       DEFINE WINDOW bro_corsi ;
		AT 0,0 ;
		WIDTH 1024 HEIGHT 580 ;
		TITLE '1000 Bolle Blu - Browse Corsi' ;

		MAIN NOMAXIMIZE ;
		ON INIT OpenCorsi() ;
		ON RELEASE CloseCorsi();

.......

... but inside the main code give me the following error running the program:

Main window already defined. Program terminated.

Of course I have my main window at beginning, but if i write MODAL in place of MAIN NOMAXRESIZE che compiler gives me error in ON INIT statement.

So, i'm just asking: If i write a file called browse.prg for example ... can i link it on the main menu? in this case i think not to have problems with MAIN statement. How can i call another prg file from the main one?
--
Riccardo Piccioli
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by Rathinagiri »

Yes. It is because, MODAL windows don't have NO MAXIMIZE option. :)

This is the syntax for MODAL windows:

Code: Select all

DEFINE WINDOW <WindowName> 
		AT <nRow> ,<nCol> 
		WIDTH <nWindth> 
		HEIGHT <nHeight> 
		[ VIRTUAL WIDTH <nVirtualWindth> ]
		[ VIRTUAL HEIGHT <nVirtualHeight> ] 
		[ TITLE <cTitle> ] 
		[ ICON <cIconName> ]
		MODAL
		[ NOSHOW ]
		[ NOAUTORELEASE ]
		[ NOSIZE ]
		[ NOSYSMENU ]
		[ NOCAPTION ]
		[ CURSOR <CursorName> ]
		[ ON INIT <InitProcedureName> | <bBlock> ]
		[ ON RELEASE <ReleaseProcedureName> | <bBlock> ]
		[ ON INTERACTIVECLOSE <InteractiveCloseProcedureName> | <bBlock> ]
		[ ON MOUSECLICK <MouseClickProcedureName>  | <bBlock> ]
		[ ON MOUSEDRAG <MouseDragProcedureName>  | <bBlock> ]
		[ ON MOUSEMOVE <MouseMoveProcedureName>  | <bBlock> ]
		[ ON SIZE <WindowSizeProcedureName>  | <bBlock> ]
		[ ON PAINT <WindowPaintProcedureName>  | <bBlock> ]
		[ BACKCOLOR <anBackColor> ] 
		[ FONT <cFontName> SIZE <nFontSize> ] 
		[ ON GOTFOCUS <ProcedureName> | <bBlock> ] 
		[ ON LOSTFOCUS <ProcedureName> | <bBlock> ] 
		[ ON SCROLLUP <ProcedureName> | <bBlock> ] 
		[ ON SCROLLDOWN <ProcedureName> | <bBlock> ] 
		[ ON SCROLLLEFT <ProcedureName> | <bBlock> ] 
		[ ON SCROLLRIGHT <ProcedureName> | <bBlock> ] 
		[ ON HSCROLLBOX <ProcedureName> | <bBlock> ] 
		[ ON VSCROLLBOX <ProcedureName> | <bBlock> ]
		[ HELPBUTTON ]
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by Rathinagiri »

So, i'm just asking: If i write a file called browse.prg for example ... can i link it on the main menu? in this case i think not to have problems with MAIN statement. How can i call another prg file from the main one?
This can be done through two ways.

If you use MiniGUI IDE to maintain your project, it will be enough if you just add the browse.prg in your project as a module. This program will also be compiled and linked along with the main prg file.

If you use batch file (compile.bat) from command prompt, then you can refer the browse.prg in your main.prg as "set procedure to browse.prg" to include browse.prg also while compiling.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
rpiccioli
Posts: 17
Joined: Sun Dec 21, 2008 8:43 am
Location: Roma - Italy

Re: i have some trobles with Harbour Mini Gui

Post by rpiccioli »

rathinagiri wrote:
...
If you use batch file (compile.bat) from command prompt, then you can refer the browse.prg in your main.prg as "set procedure to browse.prg" to include browse.prg also while compiling.
At the beginning under che include statement? Or i have to declare on an Action statement?

At the moment, in browse.prg i defined:

Code: Select all

Function MAIN

	SET CENTURY ON
	SET DELETED ON
....
Return Nil
and if i compile the file as standalone it works.

But with instruction

Code: Select all

set procedure to browse.prg
and writing in browse.prg :

Code: Select all

Function f_brocorsi
SET CENTURY ON
SET DELETED ON

DEFINE WINDOW bro_corsi ;
	AT 0,0 ;
	WIDTH 1024 HEIGHT 580 ;
	TITLE '1000 Bolle Blu - Browse Corsi' ;
	MAIN NOMAXIMIZE ;
	ON INIT OpenCorsi() ;
	ON RELEASE CloseCorsi();
...............

END WINDOW

CENTER WINDOW bro_corsi

bro_corsi.Bbro_corsi.SetFocus()

ACTIVATE WINDOW bro_corsi

Return Nil
gives me the same error than before:
Main window Alaready defined. Program Terminated

Thank you rathinagiri.
--
Riccardo Piccioli
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by Rathinagiri »

Yes. That is because MODAL windows have no option for NOMAXIMIZE. You can only have NOSIZE.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
rpiccioli
Posts: 17
Joined: Sun Dec 21, 2008 8:43 am
Location: Roma - Italy

Re: i have some trobles with Harbour Mini Gui

Post by rpiccioli »

rathinagiri wrote:Yes. That is because MODAL windows have no option for NOMAXIMIZE. You can only have NOSIZE.
so I have to put the window in browse.prg as modal.

Ok...

Thank you
--
Riccardo Piccioli
Post Reply