When I try to replace the System Menu with a Custom Menu, I have difficulties:
- if I click anywhere outside the Custom Menu, the Menu just disappears and I am stuck in Visual FoxPro9, not being able to close it, so I need to call Task Manager to force closing.
- if I click on an Item, the Form shows and works. When I click on x to Close the Form, it calls Destroy where I have the line code Activate Menu, but the Form is not destroyed and stays on screen.
- When I try to close the Menu clicking on Alt X-Q, it simply doesn't work and I'm not able to close the Menu. For this, I tried to call a small Form where in Init I have the line code Close Events. I've also tried _SCREEN.Release, no success.
I post below some code for better understanding of what I'm trying to accomplish.
main.prg
With _Screen
.BackColor = rgb(0,128,64)
.Caption = 'App Manager 20'+ Substr(Dtoc(Date()),7,2)
.Height = 780
.Width = 1020
Endwith
Define Pad padOne Of CustomMnu Prompt '\<Countries' Key Alt+C, ''
Define Pad padTwo Of CustomMnu Prompt 'E\<xit' Key Alt+X, ''
On Pad padOne Of CustomMnu Activate Popup popCountries
On Pad padTwo Of CustomMnu Activate Popup popExit
Define Popup popCountries Margin Message 'Countries'
Define Bar 1 Of popCountries Prompt '\<Germany'
Define Bar 2 Of popCountries Prompt '\<France'
Define Bar 3 Of popCountries Prompt '\<Italy'
Define Popup popExit Margin Message 'Exit'
Define Bar 1 Of popExit Prompt '\<Quit'
On Selection Bar 1 Of popCountries Do Form Germany Name Germany
On Selection Bar 2 Of popCountries Do Form France Name France
On Selection Bar 3 Of popCountries Do Form Italy Name Italy
On Selection Bar 1 Of popExit _Screen.Release
Activate Menu CustomMnu
Read Events
Deactivate Menu CustomMnu
Release Menu CustomMnu Extended
Close Databases All
Messagebox(' Normal exit! ', 0+64+0, 'Administrator')
Clear All
Quit
Thank you very much for any help!
Neculai
- if I click anywhere outside the Custom Menu, the Menu just disappears and I am stuck in Visual FoxPro9, not being able to close it, so I need to call Task Manager to force closing.
- if I click on an Item, the Form shows and works. When I click on x to Close the Form, it calls Destroy where I have the line code Activate Menu, but the Form is not destroyed and stays on screen.
- When I try to close the Menu clicking on Alt X-Q, it simply doesn't work and I'm not able to close the Menu. For this, I tried to call a small Form where in Init I have the line code Close Events. I've also tried _SCREEN.Release, no success.
I post below some code for better understanding of what I'm trying to accomplish.
main.prg
With _Screen
.BackColor = rgb(0,128,64)
.Caption = 'App Manager 20'+ Substr(Dtoc(Date()),7,2)
.Height = 780
.Width = 1020
Endwith
Define Pad padOne Of CustomMnu Prompt '\<Countries' Key Alt+C, ''
Define Pad padTwo Of CustomMnu Prompt 'E\<xit' Key Alt+X, ''
On Pad padOne Of CustomMnu Activate Popup popCountries
On Pad padTwo Of CustomMnu Activate Popup popExit
Define Popup popCountries Margin Message 'Countries'
Define Bar 1 Of popCountries Prompt '\<Germany'
Define Bar 2 Of popCountries Prompt '\<France'
Define Bar 3 Of popCountries Prompt '\<Italy'
Define Popup popExit Margin Message 'Exit'
Define Bar 1 Of popExit Prompt '\<Quit'
On Selection Bar 1 Of popCountries Do Form Germany Name Germany
On Selection Bar 2 Of popCountries Do Form France Name France
On Selection Bar 3 Of popCountries Do Form Italy Name Italy
On Selection Bar 1 Of popExit _Screen.Release
Activate Menu CustomMnu
Read Events
Deactivate Menu CustomMnu
Release Menu CustomMnu Extended
Close Databases All
Messagebox(' Normal exit! ', 0+64+0, 'Administrator')
Clear All
Quit
Thank you very much for any help!
Neculai