Introduction
We always concentrate on the timely completion of a project and delivering it to the User as quickly as possible. I will try to keep up with the schedule and deliver the project for testing to the User. But all the time I would like to have a second look at the overall design and appearance of the Forms and Reports in a relaxed atmosphere and bring in some improvements with whatever new tricks that I can think of at that point in time, besides incorporating the requirements suggested by the user.
In my past experience with this kind of trick, I have been always rewarded with appreciation from the Users. Their responses to these little things that I have incorporated into the design always encouraged me to look for something different next time. Forms are the main component of any Application that catches the eye of the Customers besides nicely formatted Reports and impressive Graph Charts.
Forms have a special place in the minds of the User. It should be pleasing to look at and user-friendly to work with. Once the initial pressure of designing the main components of an application is over and if you have enough time to have a second look at the main forms' design you can make use of your creative ideas and pull little tricks on the Form that will do wonders. All the controls we draw on the Microsoft Access Forms remain stationary forever. If we can put some action or movement, in some controls, without overdoing it, it will definitely have some positive impact on the Customers.
We have learned several animation tricks on controls in the past and If you would like to take a second look at them, then their links are given below:
- Command Button Animation
- Reminder Ticker Form
- Startup Screen Design
- Animated Floating Calendar
- Wave Shaped Reminder Ticker
- Command Button Animation-2
- Animating Label on Search Success
- Run Slide Show when Form is Idle
- Label Animation Style-1
- Label Animation Style-2
- Label Animation Variant
- Label Animation Zoom in Style
- Label Animation in Colors
- Label Animation Zoom-out Fade
- Digital Clock on Main Switchboard
Option Group Control Style Change on Mouse Move.
Here, we will do a simple trick on an Option Group Control to respond, when the mouse moves over it for the selection of options. The trick is simple, when the Option Group control is created we will give it a Raised Style design. When the mouse moves over the Option Group control the Style will change to Sunken. When the mouse moves away from the Option Group control it will go back to its earlier Raised state. The repetition of this action gives a lively look at the Option Group control.
Create a Form for Demo.
Open a new Form in Design View.
Click on the Wizard Button (with the magic wand icon) on the Toolbox to select it, if it is not already in the selected state.
Select the Option Group control and draw it on the detail section of the form.
Enter the options as shown on the design below by pressing the Tab key after each option to advance to the next row. You may enter any Text as options as you like.
Complete the design by selecting the Finish Command Button.
Move the attached label above and make it as wide as the Option Group Control and change its Caption to Main Menu.
Move the attached child label above and make its width the same as the Option Group control and align it to the left edge.
Change the Caption of the label to Main Menu.
Click on the Option Group to select it and display its Property Sheet (View - -> Properties or press ALT+Enter).
Change the following Property Values as given below:
Name = Frame0
- Back Style = Normal
- Special Effect = Raised
The Form's Class Module Code.
Display the VBA Code Module of the Form (View - ->Code or click on the Module Toolbar Button or press ALT+F11).
Copy and Paste the following VBA Code into the VBA Module of the Form:
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single) If Me.Frame0.SpecialEffect <> 1 Then Me.Frame0.SpecialEffect = 1 End If End Sub Private Sub Frame0_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single) If Me.Frame0.SpecialEffect <> 2 Then Me.Frame0.SpecialEffect = 2 End If End Sub
Save and close the Form.
The Demo Run.
Open the Form in the normal view. You will find the Option Group control is in Raised style.
Move the mouse over the control and it will enter into the Sunken state.
Move the mouse pointer away from the control and it will restore back to the Raised state.
Repeat this action in quick succession and you can see how the Option Group control responds to this simple action, otherwise, the control remains rigid forever.
No comments:
Post a Comment
Comments subject to moderation before publishing.