Does anyone use MiniGUI IDE to create a project?

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
rcain
Posts: 8
Joined: Fri Oct 17, 2008 1:54 am

Does anyone use MiniGUI IDE to create a project?

Post by rcain »

Does anyone use MiniGUI IDE to create a project.
There is no sample code that really uses the a FORM created by the IDE.

Does any one have a PORJECT that is built using the IDE that:
In the code
Opens a form.
gets data from a TextBox
Looks up a record in a DBF table,
Display’s the results on the form


The project would only have to have:
2 TextBox, one for input, one for the results
1 button to perform the lookup
1 button to terminate
the DBF only needs 2 fields, a key field and a data field.

A NewBe just needs a small example that actually does something, to get started!
All examples are just snip lets, not enough to tie anything together as far as the IDE goes.

Thanks,

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

Re: Does anyone use MiniGUI IDE to create a project?

Post by mol »

first, run IDE...
Create new project File-New Project (or simply press blank page icon)

Next - create new form Project->New Form
New form will get name "MAIN"
You can change it for "WINDOW_EXAMPLE"

Draw two TextBox: and name them: T_Search, T_Result
Draw two buttons "EXIT" "Search"
for button "EXIT":
select button "EXIT"
In window Object Inspector click on the page Events
If field "Action" write: WINDOW_Example.Release
this action will close main window
For button "Search" set action to FUN_SEARCH()


Below you have a simple program:
(I hope I didn't make any mistake... :))


#include <minigui.ch>

Function Main

use SearchedDataBase
Load Window WINDOW_EXAMPLR
WINDOW_EXAMPLE.Center
WINDOW_EXAMPLE.Activate

Return

function FUN_SEARCH

WhatToSearch := WINDOW_EXAMPLE.T_Search.Value
SearchDataBase->(DbSeek(WhatToSearch))

// now you can put your result
WINDOW_EXAMPLE.T_Result.Value := SearchDataBase->(SearchResult)
return



Have a fun with HMG and HMG IDE its great and wonderful tool!

Marek
rcain
Posts: 8
Joined: Fri Oct 17, 2008 1:54 am

Re: Does anyone use MiniGUI IDE to create a project?

Post by rcain »

I tried to create a project on my own (see attachment), taking full advantage of the IDE and bound fields…..(used DATA_BOUND sample program to get some insight, it does not use the IDE, I reproduced the minimum amount to see if it would work). Please look at my attachment, it fails trying to put data in the fields, I think..)

If the bound fields worked, it would be great….

Thanks,

Robin :o
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Does anyone use MiniGUI IDE to create a project?

Post by esgici »

rcain wrote:I tried to create a project on my own (see attachment)...
Hi Robin

Can't see your attachment :(

Regards

--

esgici
Viva INTERNATIONAL HMG :D
rcain
Posts: 8
Joined: Fri Oct 17, 2008 1:54 am

Re: Does anyone use MiniGUI IDE to create a project?

Post by rcain »

Sorry, I had the EXE file in the ZIP, it was to big, I did not notice.
Please look at it now...
Attachments
MAIN.zip
(8.6 KiB) Downloaded 667 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Does anyone use MiniGUI IDE to create a project?

Post by esgici »

rcain wrote:I tried to create a project on my own (see attachment), taking full advantage of the IDE and bound fields…..(used DATA_BOUND sample program to get some insight, it does not use the IDE, I reproduced the minimum amount to see if it would work). Please look at my attachment, it fails trying to put data in the fields, I think..)

If the bound fields worked, it would be great….

Thanks,

Robin :o
Hi Robin

Your work like a good start, congrats.

Before all, don't panic ;)

"Taking full advantage" isn't like a good perspective for beginning. Instead, running by little steps may be better.

You have correct this two points on your form :

- DATATYPE property of "Text_1" (Code) textbox must be "NUMERIC"
- DATATYPE property of "Text_4" (Birth) textbox must be "DATE"

After this correction "Error BASE/1100 Argument error: TRIM" error will go away :)

But another error waiting for you: You have control names conflicts in "Refresh" and "Save" procedures:
like Date_4 -> Text_4

You have another problem : USE'ing a table with "shared" option require "lock" ing while "save"ing.

Surely you will resolve all of them. Only need is a little patience.

Happy HMG'ing

Regards

--

esgici
Viva INTERNATIONAL HMG :D
rcain
Posts: 8
Joined: Fri Oct 17, 2008 1:54 am

Re: Does anyone use MiniGUI IDE to create a project?

Post by rcain »

Thank you for your help, some times I get a little ahead of my self....
I made the correction and it worked!

I did Clipper (5.3 for DOS) programming back in 1993 thru 1996, when you had to program everything.
I have been doing M/S Visual Basic since 96/97, it's been a long time since my Clipper days, we did not have IDE’s and Graphics.

Where can I get documentation on Harbour and MiniGUI? I still have my CA-CLIPPER books. That will help on some things, but not DEFINE WINDOW” and MENU, etc…

Again Thanks,

Robin :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Does anyone use MiniGUI IDE to create a project?

Post by esgici »

Hi Robin
rcain wrote:I made the correction and it worked!

Good news :D
rcain wrote:Where can I get documentation on Harbour and MiniGUI?
For Harbour please look at first Harbour official site

Since Harbour is quickly grown up, we have some difficulty on documentation.

On the HMG side, you may find some useful infos and sources in my web page:

Full and newest reference comes always with HMG itself (see hmg\doc folder).

Many thanks to "Le Roy" Roberto Lopez :D

Again, welcome to community.

Regards

--

esgici
Viva INTERNATIONAL HMG :D
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: Does anyone use MiniGUI IDE to create a project?

Post by Rathinagiri »

Nice explanation to Robin. Thanks Esgici.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply