473,498 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resizing the Window of a Form

3 New Member
I am trying to set the windows size of a form when it opens. It is a continuous form and on autoresize it ends up only showing one record at a time. I want to have no border. When it opens, if i had set it to have a sizeable border, I can resize and it will show more than one record. I plan on counting the records in the form and having the height change based off of that, up to a certain size. I have tried turning off autoresize and under the on open event using acCmdSizeToFitForm, but no luck. Any help is greatly appreciated, thanks.
May 17 '07 #1
2 1814
MSeda
159 Recognized Expert New Member
in the on open event set the form's insideheight to the the height of the detail multiplied by your record count plus any header or footer height.

the statement will look more or less like this
Expand|Select|Wrap|Line Numbers
  1. dim reccnt as integer
  2. dim dethi as integer
  3.  
  4. dethi =320
  5. rccnt = ???
  6.  
  7. me.form.insideheight = dethi*reccnt + me.formheader.height + me. formfooter.height
  8.  
  9.  
you'll need to flesh it out by setting the record count variable, you can use an if statement to limit the size.
This should get you started, see where it takes you and post back
May 17 '07 #2
pyropowers
3 New Member
Thanks a lot, its working now.

in the on open event set the form's insideheight to the the height of the detail multiplied by your record count plus any header or footer height.

the statement will look more or less like this
Expand|Select|Wrap|Line Numbers
  1. dim reccnt as integer
  2. dim dethi as integer
  3.  
  4. dethi =320
  5. rccnt = ???
  6.  
  7. me.form.insideheight = dethi*reccnt + me.formheader.height + me. formfooter.height
  8.  
  9.  
you'll need to flesh it out by setting the record count variable, you can use an if statement to limit the size.
This should get you started, see where it takes you and post back
May 19 '07 #3

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

Similar topics

1
10934
by: Gord | last post by:
Hello, Anybody know how to detect when a user drags between columns in a MSHFlexGrid when resizing column width? (Short of setting up a timer event that continuously monitors column width.)...
10
2287
by: riki | last post by:
Hi, i have a big problem...i'm using one jscript for resizing of all of my pics in popUp...in main html i'm having many little pics and clicking on them they open in popUp and resize to larger...
0
2614
by: TJ Talluto | last post by:
<facts> I have a "month calendar" that always displays exactly 42 days... and alongside is a vertical box that displays the detail (form fields) of any particular select event that appears on the...
11
18799
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
8
15031
by: Chris | last post by:
Hi, In design mode I built some windows with some controls (e.g. listboxes, labels, chgeck boxes etc.) in it, and I did set the property for the window size is set to normal. Now, when I run...
6
51889
by: John Bowman | last post by:
Hi All, I must be missing something really obvious, so I'd appreciate someone helping me out. I have a simple Windows form that currently only has a title bar (aka the Text Property is set) and...
5
1458
by: Alex K. | last post by:
I need to call some procedures after user resized the form. Not while he is resizing it, but AFTER resizing is finished, i.e. user released mouse button. Any ideas how to do this? Thank you
11
17798
by: Sharon | last post by:
I'm writing a new control derived from UserControl. I need to get an event when the control is done resizing. I tried the Resize, SizeChanged, Move and the Layout events and I also tried to...
3
1564
by: Ken Williams | last post by:
By default a Form is resizeable. How do I prevent the resizing of a Form ? Ken
9
5266
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
0
7125
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
7205
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...
1
6887
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
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.