Page 3 of 4

Re: i have some trobles with Harbour Mini Gui

Posted: Mon Dec 29, 2008 1:28 pm
by mol
post fragment of your code, maybe someone can help you...

Re: i have some trobles with Harbour Mini Gui

Posted: Mon Dec 29, 2008 9:24 pm
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?

Re: i have some trobles with Harbour Mini Gui

Posted: Mon Dec 29, 2008 10:47 pm
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 !!!!

Re: i have some trobles with Harbour Mini Gui

Posted: Tue Dec 30, 2008 6:23 am
by mol
My pleasure....
Sometimes I look for error for long time and can't find it.
The worst errors are stupid...

regards, Marek

Re: i have some trobles with Harbour Mini Gui

Posted: Sat Jan 03, 2009 2:18 pm
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?

Re: i have some trobles with Harbour Mini Gui

Posted: Sun Jan 04, 2009 4:36 am
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 ]

Re: i have some trobles with Harbour Mini Gui

Posted: Sun Jan 04, 2009 4:41 am
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.

Re: i have some trobles with Harbour Mini Gui

Posted: Sun Jan 04, 2009 8:31 am
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.

Re: i have some trobles with Harbour Mini Gui

Posted: Sun Jan 04, 2009 5:00 pm
by Rathinagiri
Yes. That is because MODAL windows have no option for NOMAXIMIZE. You can only have NOSIZE.

Re: i have some trobles with Harbour Mini Gui

Posted: Sun Jan 04, 2009 7:10 pm
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