This is probably really easy but i have been playing around with this and reading up on how to resize a form and its not working the way i want it to.
I have a main form and when you click on a button I have another form that pops open. Now if i have my main form maximized to full screen and then have the second form pop open it will also maximize.
How do i set the second form to open at a preset size and not get any bigger or smaller. I tried using this in the On Open function. -
With Me
-
.InsideHeight = 5150
-
.InsideWidth = 7250
-
End With
-
Which works great but if I have the main form open to full size the second form does not resize.
Appreciate the help
8 2433 @slenish
The easiest, codeless, way is to set the Border Style of the 2nd Form to Thin. This Form (2nd Form) will now have a thin Border and can include any of the Border elements. The Form isn't Resizable (the Size command on the Control menu isn't available). You often use this setting for Pop-Up Forms.
hi
if you want to use a code for resizing a form you can use this for modifing the height, width, Right, Down just assign a value for each to get the suitable view -
Private Sub Form_Open(Cancel As Integer)
-
DoCmd.MoveSize Height:=5000
-
DoCmd.MoveSize Width:=1000
-
DoCmd.MoveSize Right:=500
-
DoCmd.MoveSize down:=500
-
End Sub
hope this helps
ADezii,
Do you think that its possible to make it in to a pop up box type of format that way i can play with the sizes? I have it set to pop open now if you wish to add something to a list. Maybe I could change that to a pop up type of box instead? Not really sure how to do it right now but i will look in to it in more detail.
Mseo,
Thanks for the code on resizing it only works if the main form is not maximized then it will hold the set width and height. But if i maximize the main form and open the second form it is also maxed.
I'll keep playing with it and see if i can figure anything out.
thanks again :)
I just got it to work!
I used the combination of what both for you said and now it works perfectly. I reset the form to a pop-up and then on open set the size of the form. I can now maximize the form and open the pop-up with no problems.
Really appreciate the help.
also I found this link that helped as well. http://office.microsoft.com/en-us/ac...884371033.aspx NeoPa 32,556
Expert Mod 16PB
It seems that Pop-Up forms may be the exception to how windows work in Access (& Office apps generally it seems), which is that maximising a form actually sets the maximisation globally across all windows within the application. Pop-Up forms are not constrained to this behaviour it would seem.
NeoPa 32,556
Expert Mod 16PB
Interesting link by the way. Did you catch the Note at the bottom where it explains you can open it as a Pop-Up, even if not designed that way, with a parameter in the call?
@NeoPa
I did not see that at the bottom. I will have to play around with that and see if that works better.Is there a setting for changing it to a Dialog box?
So far using it as a pop up box works great. Still seems to function like a form just opens like a pop up when I need it to. Also editing it is a little different but not much.
NeoPa 32,556
Expert Mod 16PB
That really depends on what you mean exactly. I suggest you check out the form properties Pop Up, Modal & Border Style. Select each in turn and press F1 for Context-Sensitive Help. Read through what they all say and see if they can be used to suit your purpose.
When you've done that, you can look at the parameters for DoCmd.Openform() (also available through F1), in particular WindowMode and the value acDialog, and decide how you want to play it from there.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Roger |
last post by:
Hi All,
I have an app where I change the size of the form at run time using controls
and I do not want the user to be able to resize the form, I have removed the
min and max buttons. I have tried...
|
by: Z D |
last post by:
Hello,
BACKGROUND:
==============
I've created a Windows User Control that contains an Image Control (among
other controls).
The user control handles the picture resize event. Whenever the...
|
by: Diogo Alves - Software Developer |
last post by:
Hi there,
Since my last questions wasn't very clear, I will do it in a different way.
I want to resize my app but while resizing I dont want to see content of the
form, I just want to see the...
|
by: Rob Richardson |
last post by:
Greetings!
I have a form with a listview, a menu, and a few text boxes, labels and
command buttons. I want to resize the listview when the form is resized to
that the widths of the spaces...
|
by: DraguVaso |
last post by:
Hi,
I have to DataGrid's on a form, one on the top of my form, the other at the
bottom, but they though each other somewhere in the middle. What I want now
is that, when I resize the form, they...
|
by: nirdeshonline |
last post by:
Hi,
I have added a simple listbox in windows form under c# 2.0. It contains
a collection of approx 10 strings as list items. Now when i resize the
form whole listbox flickers.
Please tell me...
|
by: Ajith Menon |
last post by:
I have created a windows application in which the form needs to be
resized on the MouseMove event. The windows resize function takes a lot
of CPU cycles. And as the resize function is called on the...
|
by: Smitty |
last post by:
Did a search & found nothing on this. VB6 did a resize on form load
according to what I've read. I Resized screen under vista & now the text
box doesn't resize to form's clientarea. Code exists...
|
by: Bob Alston |
last post by:
I have a system where many subforms are used. Often the size of the
subform had to be larger than could be displayed without scrolling.
I set the height of the subform to the typical height...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
A lot of users at my workplace use different screen resolutions, and I build
apps to use 1680 x 1050 pixels res by default. But some users are using 800
x 600, and the apps are too large for their...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |