By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

application window

P: 5
how can I control the size of application window?
Apr 23 '10 #1
Share this Question
Share on Google+
8 Replies


ADezii
Expert 5K+
P: 8,597
@sweetsugar
Are you referring to Minimizing/Maximizing the Main Access Window?
Apr 23 '10 #2

mseo
100+
P: 181
hi
first if the your application window is a form:
you can use this code for controlling the size of your form
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     DoCmd.MoveSize Height = value
  3.     DoCmd.MoveSize Down = value
  4.     DoCmd.MoveSize Width = value
  5. End Sub
Hope this helps
Apr 26 '10 #3

P: 5
@ADezii
how can I set specific width,hieght for access window . the user can't change the size
Apr 27 '10 #4

ADezii
Expert 5K+
P: 8,597
@sweetsugar
Again, is it the 'Main' Access Window or a Form? Do you simply wish to Minimize/Maximize the 'Main' Access Window/Form, or do you wish to Resize it?
Apr 27 '10 #5

P: 5
I want to resize Main access window
Apr 28 '10 #6

ADezii
Expert 5K+
P: 8,597
@sweetsugar
You would have to send the Handle of the Main Access Window via Application.hWndAccessApp to at least 1 or 2 API Funcdtions in order to accomplish this.
Apr 28 '10 #7

P: 5
How can I do this?
Apr 28 '10 #8

ADezii
Expert 5K+
P: 8,597
@sweetsugar
It is a little complicated, but you can search for Help on the SetWindowPos() API Function, which will allow you to precisely size the Main Access Window among other things. The Declaration for this Function is:
Expand|Select|Wrap|Line Numbers
  1. Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long 
P.S. - Be sure to pass Application.hWndAccessApp as the 1st Argument to the Function (Handle to the Access Window).
Apr 28 '10 #9

Post your reply

Sign in to post your reply or Sign up for a free account.