UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Adjusting controls to fit in form    
 
   
Nikos
post Jul 2 2007, 08:01 AM
Post#1



Posts: 44
Joined: 26-August 06



Hi everybody, I seem to be need of some good advice
1)How can I adjust the size of my form and its controls according the the screen size and resolution of the computer that my database is running? Is there a way to avoid scroll bars?
2) Is there a way to detect the mouse being "above" my form buttons ? (like the enter event, but that is triggered only when the button has the focus) What I want to do is to change the color of my buttons when the mouse pointer is above them and restore it when the mouse pointer exits.
Thanks in advance
Nikos
Go to the top of the page
 
Aquadevel
post Jul 2 2007, 08:21 AM
Post#2


UtterAccess VIP
Posts: 6,902
Joined: 8-August 05
From: Earth...


Nikos ,
Welcome to UA!!!! sad.gif
1) The default is scroll bars on when a form is created. Yes you can size the form manually for
your resolution and turn the scroll bars off.
2) Take a look st the 'Mouse Move' event of the controls on the form.
Good luck with your project.
sad.gif
Go to the top of the page
 
t0nka
post Jul 2 2007, 08:29 AM
Post#3



Posts: 189
Joined: 28-June 06
From: Cheshire - Uk


You can use the attached module to automatically resize your forms to the correct resolution, just change
Private Const DESIGN_HORZRES As Long = 1280
Private Const DESIGN_VERTRES As Long = 1024
To reflect the resolution that the forms were designed in.
eg
Private Const DESIGN_HORZRES As Long = 800
Private Const DESIGN_VERTRES As Long = 600
And then on the forms you want re sizing in the OnLoad event call the procedure
Call ReSizeForm(Me)
t0nka
Attached File(s)
Attached File  modFormResize.zip ( 4.31K )Number of downloads: 45
 
Go to the top of the page
 
missinglinq
post Jul 2 2007, 09:00 AM
Post#4



Posts: 4,399
Joined: 11-November 02



Essentially, to change the formatting of an object when the mouse hovers over it, you place formatting code in two places. To change the formatting when the mouse hovers over the object:
!--c1-->
CODE
Private Sub YourButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single
  YourButtonA.ForeColor = vbRed  'Sets the text color to Red
End Sub

Then, to return the formatting to its condition prior to the hovering:
CODE
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  YourButton.ForeColor = vbBlack  'Set text color back to Black
End Sub

Of course, you can set any formatting properties the given object has with this code, not just the ForeColor, as shown in the example above.
Now the problem you're going to have is that you can't chnage the background color of a command button in Access! The dull M$ gray is controlled by Windows. There's a routine you could use, involving layering a blank label above the button, set to the color you want, then making the button transparent and so forth and then manipulating the labels. This is rather cumbersome, IMHO, and what I do is simply replace your command buttons with labels. Labels, like command buttons, have Click events, and can be used in much the same way as command buttons. With a minimal of work you can format them to look like buttons. And labels offer more in the way of formatting.
Good Luck!
Linq
Go to the top of the page
 
doctor9
post Jul 2 2007, 10:02 AM
Post#5


UtterAccess Editor
Posts: 17,924
Joined: 29-March 05
From: Wisconsin


My low-tech technique also avoids scroll bars, and requires no special code.
design my interface based on the lowest resolution that my users will be using. Worst case: The forms appear a bit smaller on higher-resolution monitors, but they're not so small that they're unreadable.
Dennis
Go to the top of the page
 
Nikos
post Jul 2 2007, 11:56 AM
Post#6



Posts: 44
Joined: 26-August 06



Thanks everybody .. I definetely got my answers.
Go to the top of the page
 
amerifax
post Mar 31 2013, 03:18 PM
Post#7



Posts: 197
Joined: 12-April 11



I have been looking all over for an example on how to create a multiple tab form using access 2013. Each tab would be kind of like a separate form that would be dedicated to lookup query, each different. I have tried many forms with not much luck. I do have a program already done, but it is in dBase IV. Since I can't port it over I have to design a whole new product and my accessibility is one step over zero.
Ye been looking all over for an example on how to create a multiple tab form using access 2013. Each tab would be kind of like a separate form that would be dedicated to lookup query, each different. I have tried many forms with not much luck. I do have a program already done, but it is in dBase IV. Since I can't port it over I have to design a whole new product and my accessibility is one step over zero.
Your form seems to have one thing that would work well for me and that's the ability for the form to respond to the size screen.
Bob
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    14th December 2017 - 11:28 PM