473,405 Members | 2,160 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,405 software developers and data experts.

How to resize a form?

283 100+
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.

Expand|Select|Wrap|Line Numbers
  1. With Me
  2. .InsideHeight = 5150
  3. .InsideWidth = 7250
  4. End With
  5.  
Which works great but if I have the main form open to full size the second form does not resize.

Appreciate the help
Apr 17 '10 #1
8 2433
ADezii
8,834 Expert 8TB
@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.
Apr 18 '10 #2
mseo
181 100+
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
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     DoCmd.MoveSize Height:=5000
  3.     DoCmd.MoveSize Width:=1000
  4.     DoCmd.MoveSize Right:=500
  5.     DoCmd.MoveSize down:=500
  6. End Sub
hope this helps
Apr 19 '10 #3
slenish
283 100+
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 :)
Apr 19 '10 #4
slenish
283 100+
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
Apr 19 '10 #5
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.
Apr 20 '10 #6
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?
Apr 20 '10 #7
slenish
283 100+
@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.
Apr 20 '10 #8
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.
Apr 21 '10 #9

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

Similar topics

1
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...
3
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...
1
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...
4
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...
2
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...
8
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...
11
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...
2
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...
1
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...
10
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
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,...
0
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...
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...
0
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...
0
tracyyun
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...

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.