create menu at runtime with HMG

Moderator: Rathinagiri

User avatar
jairpinho
Posts: 209
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Been thanked: 1 time
Contact:

create menu at runtime with HMG

Post by jairpinho » Fri Apr 06, 2012 12:01 am

need to create menu at runtime with HMG using dbf mysql or if someone has an example of how to do this with HMG please post an example

[u]Moderator Notes[/u] (Pablo César) wrote:Topic moved from Forum en Español.
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

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

Post by mol » Fri Apr 06, 2012 5:13 am

you can create it using code like this one:

Code: Select all

		DEFINE MAIN MENU OF OknoGlowne
			DEFINE POPUP "Projektant przycisków"
				MENUITEM "Zapisz definicję przycisków" ACTION ZapiszDefinicjePrzyciskow()
				MENUITEM "Porzuć projektowanie" ACTION PorzucDefiniowaniePrzyciskow()
				MENUITEM "Przywróć domyślne definicje przycisków" ACTION DomyslnaDefinicjaPrzyciskowOknaGlownego()
			END POPUP
		END MENU
Once upon a time, I've created control ACHOICE, which was working link old achoice, you can search it on the forum...
Here it is:
viewtopic.php?f=5&t=1180&p=18241&hilit=achoice#p18241

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 246 times
Been thanked: 91 times
Contact:

Post by esgici » Fri Apr 06, 2012 9:07 am

Viva INTERNATIONAL HMG :D

User avatar
jairpinho
Posts: 209
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Been thanked: 1 time
Contact:

Post by jairpinho » Fri Apr 06, 2012 3:51 pm

these examples already noticed, which would really need a manager menu at runtime, which can create delete modify menus at runtime.

thanks for the help of all
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

User avatar
tave2009
Posts: 60
Joined: Tue Jul 14, 2009 3:33 am
Location: San Francisco, Córdoba, Argentina.
Been thanked: 1 time

Post by tave2009 » Fri Apr 06, 2012 9:06 pm

This is the file ... (Edmenu.prg)
try with this
regards
Attachments
Edmenu.zip
(11.92 KiB) Downloaded 170 times
Nada se pierde. Todo se transforma. (Lavoussier)
Nothing is lost. Everything changes.

User avatar
jairpinho
Posts: 209
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Been thanked: 1 time
Contact:

Post by jairpinho » Sat Apr 07, 2012 12:11 am

not compiling from HMG IDE

hbmk2: Harbour: Compilando m¢dulos...
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, http://harbour-project.org/

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(63) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(66) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(69) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(72) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(75) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(79) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(82) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(85) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(88) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(118) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(119) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(122) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(125) Error E0030 Syntax error "syntax error at '@'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(897) Error E0030 Syntax error "syntax error at ''"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(926) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(928) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(932) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(934) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(941) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(943) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(947) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg(949) Error E0030 Syntax error "syntax error at 'CM_CAPTION'"

22 errors

No code generated.
hbmk2: Erro: Executando o compilador Harbour (interno): 1
(C:\HMG3.0.38\harbour\bin\harbour.exe) -n2 K:\@Prog-Xbase\HMG-3038\Projetos\Edmenu\edmenu.prg -q -o.hbmk\win\mingw\ -iC:\HMG3.0.38\harbour\include -i. -iC:\HMG3.0.38\include




tave2009 wrote:This is the file ... (Edmenu.prg)
try with this
regards
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

User avatar
tave2009
Posts: 60
Joined: Tue Jul 14, 2009 3:33 am
Location: San Francisco, Córdoba, Argentina.
Been thanked: 1 time

Post by tave2009 » Sat Apr 07, 2012 10:35 am

Este software es para la HMG extendida tenes que adaptarlo
Pero ahora te adjunto el ejecutable para que pruebes.
Slds.
Walter
Attachments
edmenu.zip
(591.49 KiB) Downloaded 186 times
Nada se pierde. Todo se transforma. (Lavoussier)
Nothing is lost. Everything changes.

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 246 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Apr 07, 2012 11:56 am

tave2009 wrote:... tenes que adaptarlo...
Walter
Adapted.

Regards / saludos.

--

Esgici
EdMenu&Demo.zip
EdMenu.prg & Demo.prg
(8.86 KiB) Downloaded 198 times
Viva INTERNATIONAL HMG :D

User avatar
tave2009
Posts: 60
Joined: Tue Jul 14, 2009 3:33 am
Location: San Francisco, Córdoba, Argentina.
Been thanked: 1 time

Post by tave2009 » Sat Apr 07, 2012 3:44 pm

Español:
Gracias Esgici,
Me asombra tu rapidez.
Saludos
Walter

Inglés (Google)
Thanks Esgici,
It amazes me your speed.
regards
Walter
Nada se pierde. Todo se transforma. (Lavoussier)
Nothing is lost. Everything changes.

User avatar
jairpinho
Posts: 209
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Been thanked: 1 time
Contact:

Post by jairpinho » Sat Apr 07, 2012 6:17 pm

this was what I wanted in HMG, THANK ESGICI and tave2009


esgici wrote:
tave2009 wrote:... tenes que adaptarlo...
Walter
Adapted.

Regards / saludos.

--

Esgici
EdMenu&Demo.zip
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

Post Reply