Set color of forms according to the colors of the Microsoft Windows system

Posted on Saturday, January 5, 2008 - 16:54 | by admin |

Using the properties BackColor, and ForeColor BorderColor, you can create in Microsoft Access a color scheme that matches the color scheme used in other Windows applications. This is particularly useful when you are developing an application to be distributed to multiple users. Set color properties such as colors Windows system allows you to specify a single definition that can display different colors on the computers of individual users, as the colors they have chosen in the Windows Control Panel.
1 Open a form in Design view.
2 Open the property sheet for the section or control.
3 In the property sheet, click the Color property of the Fund, or Color Edge Foreground Color.
4 In the property box, type one of the numbers listed in the table below. For example, if you want the background of your form to display the same color as you or another user uses as background color of Windows, set the Background Color as -2147483643, the value of window.
Screen element value

Scroll bar -2147483648
Desktop -2147483647
Title bar of the active window -2147483646
Title bar of the inactive window -2147483645
Menu bar -2,147,483,644
Window -2147483643
Window frame -2147483642
Menu text -2147483641
Text -2147483640 Window
Text of the title bar -2147483639
Edge of the active window -2147483638
Inactive window border -2147483637
Background application -2147483636
Highlight -2147483635
Text highlighted -2147483634
3-D surface -2147483633
Shadow -2147483632 3-D
Text dimmed (disabled) -2147483631
Button Text -2147483630
Text of the title bar of the inactive window -2147483629
Highlight -2147483628 3-D
3-D dark shadow -2147483627
Light -2147483626 3-D
Text -2147483625 ToolTip
Background ToolTip -2147483624

Comments
• Value of the color Windows system refers only to the color element screen listed, and not the type of object which can be assigned. For example, you could set the Back Color property of a text box as the Windows system color for the scroll bars, the desktop or any other element of the screen.
• The values ​​for the screen elements of Windows are always the same, regardless of the color settings of the user.
• You can also set the properties BackColor, and ForeColor BorderColor color as a Windows system using Visual Basic for Applications.

RSS feed | Trackback URI

3 Comments »

Comment by Paul Henry
2009-03-27 23:34:00

How do I activate and deactivate buttons and other items of a form according to the industry user?

Example:

The Head of the department can change certain information that the trainee can not. So the fields that have this type of information would be unavailable to the user.

Only the information I need.
Thank you.

Comment by Administrator
2009-03-28 10:55:29

Hello Paul,

First to open the form have to check what type of user who is opening the form.
Once upon the type of user can do the following code in the Form Properties to open the event, for example:
Check who logged in, or when login can eg pass data to a global variable for later access of any form.

after:

select case tipodeusuario
trainee case
me.botão1.enabled = false
me.botão2.enabled = false
Head case
me.botão1.enabled = true
me.botão2.enabled = true
end select

Comment by Sergio Rui
2009-11-23 10:44:54

Good Day
It's possible I change the color of the windows of access?
è I have an application in shades of brown and the windows of the error messages and forms are all in blue.
Greetings

Name (required)
Email (required - not published)
Website
Your comment ( Decrease | Increase )
You can use <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <b> <cite> <code> <del datetime=""> <em> <i> <Q cite=""> <strike> <strong> in the comments.

Presentation

Avatar

Thank you for visiting.
Subscribe to feed not to miss any messages.

Here in blog I will provide examples of working with Microsoft Access and also ask questions to those who ask. More

Want to subscribe?

Subscribe or subscribe by email:
Enter your email:


Ads