reformatting form buttons?

mpaccess

New member
Local time
Today, 02:20
Joined
Jul 29, 2008
Messages
9
anyone familiar with the reformatting of form buttons? can it be done?

Thanks!
 
Reformatting like the look? From what I recall what I read .... do you mean like using an image (or images if you want to use mouse-over to switch to show an active button) and then using OnClick events?

-dK
 
Yes. Create a button on your form. Look at the properties of the button. Some of them are position, some are size, some contain an image reference (if it is a picture button) or a caption (if it is a text button). EVERY ONE of the properties is fair game for VBA code to muck about. You will have to write VBA code to not only change the button format, but also you will need to include a Me.Repaint after you have made the changes. Otherwise the repaint won't occur right away.

To reposition buttons: Look at properties TOP and LEFT. You can move a button relative to other items on a form. I had a form where I moved buttons and made some buttons invisible when the corresponding action wasn't possible. (Propery is .VISIBLE)
I also made the buttons become disabled just in case... (property .ENABLED).

When moving buttons, be careful to allow for proper positioning. Look at the height and width of the button. What I did was when I had a "base" button, all other buttons went on-screen with the same .TOP value as the one for the base button. Their .LEFT was set to the previous visible button's .LEFT + that button's .WIDTH + 1.

You need to have the constants for edge styles, but you have six to play with. Raised, beveled, chiseled, flat, etc...

you CANNOT play with the color of the button because that is inherited from Windows itself. Only the "Windows Theme" can affect button color. But you can cover the button with an image (.PICTURE) or change the color of the text on the button. (.FORECOLOR)
 

Users who are viewing this thread

Back
Top Bottom