473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Keeping a form maximised?

I have a main form that is my start-up form. I want this form to be
maximized all the time, so in the code for Form_Load I have DoCMD.Maximize.
However, as soon as I open another form that is not maximized, this Main
form loses its maximized state and the forms kinda Tile themselves.

Any suggestions as to how I can keep this form maximized all the time?

Anyone know of a way that I can get the size of the application display area
so my form can be sized on startup maybe? (I don't need the code - just to
be pointed toward the correct object and property)

Thanks for any help

--

/ Sean the Mc /

"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous

Nov 13 '05 #1
3 4664
Rog
When you maximize -or restore- a form, you maximize or restore the
whole application. Only pop-up forms keep their original size. What
you can do is maximize your form "on activate", that way it will
maximize again when it becomes active again.

Nov 13 '05 #2
Thanks for the suggestion - Best I have now.

Anybody know of a way to get the display area height and width?

--

/ Sean the Mc /

"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous
"Rog" <de********@state.gov> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
When you maximize -or restore- a form, you maximize or restore the
whole application. Only pop-up forms keep their original size. What
you can do is maximize your form "on activate", that way it will
maximize again when it becomes active again.

Nov 13 '05 #3
"What-a-Tool" <Di*************************@IHateSpam.Com> wrote
Thanks for the suggestion - Best I have now.

This may be more than you are looking for, but I have used this method
successfully to keep several of my primary forms maximized. In each of the
forms that I want to remain maximized always, I add the following:

Private Sub Form_Resize()
If GetMaximize(Me.Name) Then Me.TimerInterval = 1
End Sub

Private Sub Form_Timer()
DoCmd.Maximize
Me.TimerInterval = 0
End Sub
In a module:

Private shouldMaximize As Boolean

Public Sub SetMaximize(doMax As Boolean)
shouldMaximize = doMax
End Sub

Public Function GetMaximize(callingForm As String) As Boolean
GetMaximize = shouldMaximize
End Function

I only actually call SetMaximize twice - once, to set it to false as each of
the primary forms are opened:

SetMaximize False
With DoCmd
.OpenForm "HomeForm", , , , , acHidden
.OpenForm "OffenderForm", , , , , acHidden
.OpenForm "AddressForm", , , , , acHidden
.OpenForm "InvestigationForm", , , , , acHidden
.OpenForm "ObligationForm", , , , , acHidden
.OpenForm "PhotoForm", , , , , acHidden
.OpenForm "DocForm", , , , , acHidden
.OpenForm "SupervisionForm", , , , , acHidden
End With

and shortly after, when they are loaded:

SetMaximize True. The SetMaximize is necessary to prevent flicker on
opening the primary forms.

Drawback: Reports can only be previewed from one of the primary forms, not
from a called dialog form, otherwise the report 'hides' behind the primary
(maximized) form.


Darryl Kerkeslager
Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
17
by: Geoff Cox | last post by:
Hello, Can I use JavaScript to force a maximised window ? Thanks
1
by: Ant | last post by:
I have a form ‘Main’ and it is maximised, on the form is a command button to open another form over the top I always want it to open in a window restored, currently sometimes it opens maximised...
1
by: SteveShanks | last post by:
Hi Al How can I set the size of an mdi child form to fill the parent windows as if it was maximised without actually maximising the form as this causes all my subsequent child forms to be...
4
by: kaosyeti | last post by:
what's the best way to get a form to always open at a specific size. i've sized and saved the forms, changed the borders and had popup on and off all over but can't seem to get it to stay one way...
4
by: Daniel R. Rossnagel | last post by:
As I can hide the bar of I title of a window daughter maximized within form MDI Already I have proven with different types from borders, hiding thebuttons to maximize, to diminish and control box,...
9
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How...
3
by: aman909 | last post by:
I would like it so when a form is opened, it opens in the maximised size that is possible. How do i do this?
2
by: Samuel | last post by:
I have some questions that are sort of connected. I use Access 2003. Is it possible to set some properties that can make the Access window open at a particular size? Is it possible to make a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.