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.
How to connect device scanner with visual basic, its analogy I made button scan in vb and typing button scan in press scanner live and walk .. how? Help ...
I have the following problem.
when i pres buttun printpreview (button 5) the the print preview fires up.
and when i close the print preview without printing and minimize the ...
Hi all! I need help understanding what my teacher expects from this project.
Here is the link to the instructions for the project: http://cs.ecu.edu/~karl/2530/spr18/Assn/Assn5/assn5.html
I wrote a little bit of ...