Page 1 of 4
i have some trobles with Harbour Mini Gui
Posted: Sun Dec 21, 2008 4:16 pm
by rpiccioli
Hallo from Italy,
first of all sorry for my english.
i've got some troubles with Harbour Mini Gui.
In a folder i begin to copy the example showed in the reference
#include "minigui.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 200 ;
TITLE 'Tutor 01 - Hello World!' ;
MAIN
END WINDOW
ACTIVATE WINDOW Win_1
Return
and I saved it on i file called main.prg.
Then i tried to compile in the same directory with the statement: compile main
A program error window shows me as following:
Harbour MiniGUI 2.6.7 (2008.10.09)
Main Window Not Defined. Program Terminated
Called from _DEFINEWINDOW(2851)
Called from MAIN(9)
-------
I see it on a file called Harbour MiniGui Errorlog. What's wrong?
And I have a second trouble with the Harbour MiniGUI IDE
I open it. Clicking on a New project icon I have a Windows where i have to write the name of the project. Every name i write inside, I have an error message: Invalid project Name/path (Spaces And Special charactore Not Allowed).
My operating system is windows XP
Re: i have some trobles with Harbour Mini Gui
Posted: Sun Dec 21, 2008 5:36 pm
by esgici
rpiccioli wrote:Hallo from Italy,
Ciao rpiccioli, welcome aboard
i've got some troubles with Harbour Mini Gui
Don't panic, it's normal at the beginning.
Main Window Not Defined. Program Terminated
I can't see any problem in your source code. Are you sure that this is exactly your's ? Please check it again.
Invalid project Name/path (Spaces And Special charactore Not Allowed).
This error is about not only file name you had specified, include also path name. For example if you open your working folder under Desktop, you will have a path name including spaces. Language specific ( non English ) characters are special ones.
Happy HMG'ing
Regards
PS: Don't worry about language, your English is better than mine
--
esgici
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 8:37 am
by rpiccioli
Wonderful...
It works!!! Thank you.
.. and another queston for you all
I hope not to irritate you.
In HMG Ide i'm just drawing some forms.
The first one has some Buttons.
To join another form i've just designed pushing a button ... how can i link them to the button from main?
Thank you
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 12:48 pm
by esgici
Hello Riccardo
rpiccioli wrote:
...
To join another form i've just designed pushing a button ... how can i link them to the button from main?
We have two way for
linking a form :
ACTIVATE and
SHOW methods /commands. If you want to activate it
after pushing a button in the main window ( say name is frmSecond ) put
INIT clause of main form :
frmSecond.Hide, and then
ACTION clause of button :
frmSecond.Show.
- You can also use a separate Function/Procedure ( say MakeSecondForm() )for defining and activating second form. In this case
ACTION clause of button will ve calling this Function/Procedure, such as MakeSecondForm().
I hope that I understand rigth your question and this answer will be useful for you.
Pleas don't hesitate for ask, nobody will be irritated.
Regards
--
esgici
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 2:10 pm
by rpiccioli
esgici wrote:Hello Riccardo
rpiccioli wrote:
...
To join another form i've just designed pushing a button ... how can i link them to the button from main?
We have two way for
linking a form :
ACTIVATE and
SHOW methods /commands. If definition of second form is in the main window, you don't have activate is separately, it will be activated with main form. If you want to activate it
after pushing a button in the main window :
- If definition of second form is in the main window, ( say name is frmSecond ) put
INIT clause of main form :
frmSecond.Hide, and then
ACTION clause of button :
frmSecond.Show.
- You can also use a separate Function/Procedure ( say MakeSecondForm() )for defining and activating second form. In this case
ACTION clause of button will ve calling this Function/Procedure, such as MakeSecondForm().
I hope that I understand rigth your question and this answer will be useful for you.
Pleas don't hesitate for ask, nobody will be irritated.
Regards
--
esgici
inside Harbour MiniGUI IDE ?
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 2:16 pm
by esgici
rpiccioli wrote:
inside Harbour MiniGUI IDE ?
There isn't any difference in or outside of IDE.
You may select by whichever will be easy for you.
Regards
--
esgici
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 2:58 pm
by rpiccioli
esgici wrote:rpiccioli wrote:
inside Harbour MiniGUI IDE ?
There isn't any difference in or outside of IDE.
You may select by whichever will be easy for you.
Regards
--
esgici
Of course... but inside i'm not able to locate the command to do it ...
I am in events settings of the button.. and I see:
Action -> Nil
OnGotFocus -> Nil
OnLostocus -> Nil
where i have to link the form? and.. what kind of syntax i have to use?
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 4:26 pm
by esgici
rpiccioli wrote:
... but inside ( HMG-IDE ) i'm not able to locate the command to do it ...
I am in events settings of the button.. and I see:
Action -> Nil
OnGotFocus -> Nil
OnLostocus -> Nil
where i have to link the form? and.. what kind of syntax i have to use?
Dear Riccardo
For changing a property or event of any control ( including forms ) inside HMG-IDE, simply
double click that property or event name in the
Object Inspector Window's
Properties or
Events tab and make change whatever you want in the mini form opened. For example if you want changing default assignment ( Nil ) of Action event of a button, an "
Event Update" dialog box will be open and you can enter your own action statement.
Action statements are any valid HMG statement, calling a function / procedure, a semi-oop HMG command, even a codeblock.
If you read and preferably test ( compile and run ) samples and tutorials, surely you will find many usages.
Happy HMG'ing
Regards
--
esgici
Re: i have some trobles with Harbour Mini Gui
Posted: Mon Dec 22, 2008 9:00 pm
by esgici
rpiccioli wrote:
...
To join another form i've just designed pushing a button ... how can i link them to the button from main?
...
Hello Riccardo
I am afraid that my previous posts was a little complex and confusing.
Please look at this working sample about using multiple form :
Code: Select all
#include <minigui.ch>
Function Main
DEFINE WINDOW frmMFMain ;
AT 138, 235 ;
WIDTH 550 ;
HEIGHT 350 ;
TITLE "Main Form" ;
MAIN
DEFINE BUTTON Button_1
ROW 40
COL 50
WIDTH 150
HEIGHT 30
ACTION Make2ndForm()
CAPTION "Second Form"
END BUTTON
END WINDOW // frmMFMain
frmMFMain.Activate
Return // Main()
Procedure Make2ndForm()
DEFINE WINDOW frmSecond ;
AT 50, 50 ;
WIDTH 250 ;
HEIGHT 150 ;
TITLE "Second Form" ;
MODAL
END WINDOW // frmSecond
frmSecond.Activate
Return // Make2ndForm()
I hope that will be useful for you.
Regards
--
esgici
Re: i have some trobles with Harbour Mini Gui
Posted: Wed Dec 24, 2008 10:24 am
by rpiccioli
esgici wrote:rpiccioli wrote:
...
To join another form i've just designed pushing a button ... how can i link them to the button from main?
...
Hello Riccardo
I am afraid that my previous posts was a little complex and confusing.
Please look at this working sample about using multiple form :
[...]
I hope that will be useful for you.
Regards
--
esgici
Hiya Esgici,
It works lovely and fluently! Thank you a lot ..
I noticed instructions as:
I don't remember in clipper language this statement. I think it is a statemente to activate the form in the window.. or better ... to activate the form inside the procedure.
Have you got a list about this statement? I don't have them, and I cant' found them on the site.
At the moment i'm looking for a 'windows statement' to close a window pushing a button...
Rick