Am trying to make my program menu and skin resize when I disable the MainMenu VCL I have attached a image of a program that uses same idea when menu is enabled there is too buttons hidden but once the menu is disabled the pager and options buttons and rest of the skin is visible I been trying to recreate this with out any luck can any one help ?
The easiest way is:
a) Add a TPanel to your form. Let's say you call it HiddenPanel.
b) Set the Align property of the HiddenPanel to alTop and delete the panel's caption.
c) Set the height of HiddenPanel to be the menu height. Do this in code in case the user changes their settings. Add this line to the form's onCreate event handler:
HiddenPanel.Height := GetSystemMetrics(SM_CYMENU);
d) Set the initial visibility state of the panel based on whether the menu is visible. So add this code to the form's onCreate event handler:
HiddenPanel.Visible := (Menu = nil);
d) Put the Pager and Options buttons on HiddenPanel.
e) To hide the menu and reveal the buttons your code would be:
LockWindowUpdate(Self.Handle); try Menu := nil; HiddenPanel.Visible := TRUE; finally LockWindowUpdate(0); end;
(The LockWindowUpdate calls are there to prevent flickering).
f) To Re-display the menu in place of the buttons your code would be (if your menu is called MainMenu1):
LockWindowUpdate(Self.Handle); try Menu := MainMenu1; HiddenPanel.Visible := FALSE; finally LockWindowUpdate(0); end;
You may also want to disable keyboard-based operation of the Pager and Options buttons.
Yes that hides the buttons when menu is disabled but it dont cover the top of the theme image so you can still see were the buttons should be if you look at the image when the menu is enabled the buttons and the top of the theme is invisiable I been trying to work this out with out any luck
If the buttons are shown as an image you need to split the image into 2 parts and put one part onto HiddenPanel. This should be done programmatically when you set the height of the hidden panel to match the height of the menu.
I am having a trouble not knowing how to do a java code that will take user string then encrypt it using Elgamal algorithm as following
Elgamal algorithm Pseudo code: ...
I am learning to code and found interesting task, but i do not know where to start in solving it. So i have a file with some titles and comments ...
A few weeks ago my laptop browsing and windows apps error. When i am on my facebook account i can watch youtube videos posted on feeds but other videos pos ...