Hola Franco
Con Harbour (modo consola) puedes seguir haciendo lo que hacías con Clipper.
Pero si quieres hacerlo con HMG (modo grafico), necesitas "pensar" de modo diferente.
Si quieres seguir con HMG, deberas compilar y probar los múltiples ejemplos que tiene
la carpeta SAMPLES para que vayas entendiendo su manejo.
No se si ya viste este magnifico tutorial de Giovanni Di Maria, te será de mucha utilidad.
Se encuentra en: \HMG\3.4\DOC\data\index.htm
---------------------------------------------------------------------------------------------------------------------------
Hello Franco
With Harbour (console mode) you can keep doing what you did with Clipper.
But if you want to do with HMG (graphic mode), you need to "think" differently.
If you want to continue with HMG, you will have to compile and test the many examples that have
the SAMPLES folder for you to go understanding management.
I do not know if you saw this magnificent tutorial "Giovanni Di Maria" will be very useful.
It is located at: \HMG\3.4\DOC\data\index.htm
Set function key to a Value
Moderator: Rathinagiri
Re: Set function key to a Value
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Set function key to a Value
Hello to all.
Finally I have come up with what I need From all your help.
I have gotten some knowledge from every post. Thank You All.
Here is what I have come up with
Any additional thoughts ? .... Franco
Finally I have come up with what I need From all your help.
I have gotten some knowledge from every post. Thank You All.
Here is what I have come up with
Code: Select all
#include <hmg.ch>
Function Main
public CtrlF2 := 'My Macro 1', CtrlF3 := 'My Macro 2'
private a := ''
DEFINE WINDOW Win1 ;
AT 0,0 ;
WIDTH 800 ;
HEIGHT 400 ;
TITLE 'Test Input' MAIN
DEFINE LABEL LAB1
ROW 20
COL 200
WIDTH 280
HEIGHT 20
VALUE 'Enter Text Or ( (Macro sets) Or ( F4) For Inputbox) '
END LABEL
DEFINE TEXTBOX TEXT1
ROW 10
COL 10
WIDTH 150
HEIGHT 20
ON ENTER { || {Win1.Text2.Setfocus }}
END TEXTBOX
DEFINE TEXTBOX TEXT2
ROW 35
COL 10
WIDTH 150
HEIGHT 20
ON ENTER { || {Win1.Text1.Setfocus }}
END TEXTBOX
SetKeys('Win1') //sets all macros
On Key F4 of Win1 Action { || {myInputbox()} , {msgbox('Now I Can Do Something With '+a)}}
END WINDOW
CENTER WINDOW Win1
ACTIVATE WINDOW Win1
Return
Function MyInputBox
DEFINE WINDOW MyBox ;
AT win1.height/2,win1.width/2 ;
WIDTH 300 ;
HEIGHT 100 ;
NOMAXIMIZE ;
NOMINIMIZE ;
NOSIZE;
TITLE 'Input Window' CHILD
DEFINE LABEL LAB1
ROW 10
COL 10
WIDTH 280
HEIGHT 20
VALUE 'Enter Text (Escape/Blank to Exit)'
END LABEL
DEFINE TEXTBOX TEXT1
ROW 30
COL 10
WIDTH 280
HEIGHT 30
ON ENTER { || {a := MyBox.Text1.Value} , {MyBox.Release} }
END TEXTBOX
SetKeys('MYBOX') // Sets all macros
ON KEY ESCAPE OF MyBox Action MyBox.Release
END WINDOW
MyBox.Text1.Setfocus
CENTER WINDOW Mybox
ACTIVATE WINDOW Mybox
Return
Function SetKeys(Fun)
// sets all macros
ON KEY CONTROL+F2 OF Fun ACTION SetProperty( Fun , GetProperty( Fun , ;
'FocusedControl' ) , 'Value' , CtrlF2 )
ON KEY CONTROL+F3 OF Fun ACTION SetProperty( Fun , GetProperty( Fun , ;
'FocusedControl' ) , 'Value' , CtrlF3 )
* And so on More Macros
Return
Last edited by franco on Sat Jul 30, 2016 5:54 pm, edited 1 time in total.
All The Best,
Franco
Canada
Franco
Canada
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Set function key to a Value
Franco,
It works perfect. Although I cannot think of any use at this moment, I'm sure it will someday (now that we have it!).
Thanks, Serge
It works perfect. Although I cannot think of any use at this moment, I'm sure it will someday (now that we have it!).
Thanks, Serge
There's nothing you can do that can't be done...
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Set function key to a Value
Franco,
By the way: there is this last ')' giving a compile error: VALUE 'Enter Text Or ( (Macro sets) Or ( F4) For Inputbox' )
By the way: there is this last ')' giving a compile error: VALUE 'Enter Text Or ( (Macro sets) Or ( F4) For Inputbox' )
There's nothing you can do that can't be done...
Re: Set function key to a Value
Serge,
Fixed ....Thanks for note.
Franco
Fixed ....Thanks for note.
Franco
All The Best,
Franco
Canada
Franco
Canada