473,387 Members | 1,455 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,387 software developers and data experts.

Resize Form Controls and Subform Controls at the same time

In terms of resources, wondering if it makes a difference in adopting
one of the three options below for resizing controls on a form and
controls on a subform at the same time.

option a.) Put the code all in the main form and refer to the controls
on the subform in the main form's OnResize event.

option b.) Put the code for the main form controls in the main form's
OnResize event and put the code for the subform controls in the
subform's OnResize event.

option c.) Put all the code in a module and call it on the OnResize
event of the main form.

What this code is doing is positioning the controls based on the form
or subform's width:

Dim mainWid as Long, subWid as Long
mainWid = Me.InsideWidth
subWid = Me.Child.Form.InsideWidth

Me.ControlName.Left = mainWid - 500
Me.Child.Form.ControlName.Left = subWid - 200
etc.

Just wondering what advice people have to offer on this.
lq

Nov 13 '05 #1
0 3071

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

Similar topics

4
by: Soryt | last post by:
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or...
2
by: Claude | last post by:
Let' say we have an application for a production facility running 24/7 broken into 3 shifts 6-2,2-10,10-6 each production report date contains 3 shifts as above in each shift there can be from...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
4
by: Bugs | last post by:
Hi, I wonder if anyone can help me out. I'm building a vb.net application that has a form with a panel that contains several other sub forms (as a collection of controls). What I'm wanting to...
2
by: Magenta | last post by:
What I'd like to do display a form that consists of subforms, and allow a user to resize the sections of a form at will. For example, if a form has three subforms, each placed vertically and...
5
by: ApexData | last post by:
I have a Continuous SubForm on a TabPage. Above the ContinuousForm is a "box of fields" I use to display the entire record that the focus is on. When one points to a record using the...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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
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
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.