i have some trobles with Harbour Mini Gui

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 3069
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 179 times
Been thanked: 96 times
Contact:

Re: i have some trobles with Harbour Mini Gui

Post by mol » Mon Dec 29, 2008 1:28 pm

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

User avatar
mol
Posts: 3069
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 179 times
Been thanked: 96 times
Contact:

Post by mol » Mon Dec 29, 2008 9:24 pm

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

Post by rpiccioli » Mon Dec 29, 2008 10:47 pm

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: 3069
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 179 times
Been thanked: 96 times
Contact:

Post by mol » Tue Dec 30, 2008 6:23 am

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

Post by rpiccioli » Sat Jan 03, 2009 2:18 pm

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: 5250
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 167 times
Been thanked: 165 times
Contact:

Post by Rathinagiri » Sun Jan 04, 2009 4:36 am

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: 5250
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 167 times
Been thanked: 165 times
Contact:

Post by Rathinagiri » Sun Jan 04, 2009 4:41 am

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

Post by rpiccioli » Sun Jan 04, 2009 8:31 am

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: 5250
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 167 times
Been thanked: 165 times
Contact:

Post by Rathinagiri » Sun Jan 04, 2009 5:00 pm

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

Post by rpiccioli » Sun Jan 04, 2009 7:10 pm

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