Link to home
Start Free TrialLog in
Avatar of andrewyu
andrewyu

asked on

system menu

How can I disable all the buttons on the right hand side and enable the system menu on the left hand side of a form ?

How can I use a new system menu ?

Andrew
Avatar of subrek
subrek

For a new system menu you can simply use a popup-menu which is definded as a default
popup menu or a system menu for your form ....

To disable the buttons you have to use the BorderIcons property of the Form ....
But how to move them to the left hand side ?
Create a new component (a TWinControl or TCustomGraphic or something like that ....)

    Subrek .....
andrewyu

subrek is correct on the borderIcons side of things...but to change the system menu items etc... use the GetSystemMenu, GetMenuItemId etc and then the SetMenu etc...API calls, just check it up in the Win32.hlp file...

if you need some help I have writen my own system menu component that allows you to add items etc to the system menu...(just leave your mail address)

Later
BoRiS
Avatar of andrewyu

ASKER

I want to visible the left hand side menu and invisible all the other buttons !

Anyway, thank you very much !

Andrew
are you talking of the bordericons of a form?
I think so as I only know that it is the icon !
andrewyu
First remove form's captionbar. Then place a panel on the top of the form. panel's color should be blue. Set the panel's layout to show where you want the caption of the panel(in this case fomr's caption). Then call an API to move the form when the mouse is down on the panel. Put a TImage control on the caption which will be the icon of the form, and then connect a popup menu to the image. enter the values of the popup, and almost everything is done...If you like a simple source code I've tried to make this just E-mail me at viktor@megsinet.net  and mention what is your question because there are many e-mails and I won't remmember what it is about. C'ya
Thank you very much !

But, can I achieve easier through the APIs instead of using this method ?

Andrew
ASKER CERTIFIED SOLUTION
Avatar of Matvey
Matvey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, forgot to say: there is no need to make a fake caption, a fake icon and a fake menu. It's possible to edit the original one.