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

Forms resizing

553 512MB
I have 2 forms. Form1 and Form2

With a button click on form1 , i can open Form2.

How can i send a message to Form2 so that it open with size i provide from Form1 - I dont want to put the code in Form2 because i may need to open Form2 from different forms and all the times, the sizes would be different
Jul 20 '07 #1
3 1404
ADezii
8,834 Expert 8TB
I have 2 forms. Form1 and Form2

With a button click on form1 , i can open Form2.

How can i send a message to Form2 so that it open with size i provide from Form1 - I dont want to put the code in Form2 because i may need to open Form2 from different forms and all the times, the sizes would be different
How exactly are you providing the sizes for Form2 within Form1?
Jul 20 '07 #2
questionit
553 512MB
For example, if i open a form:

Call DoCmd.OpenForm("frm_sub_search_client", acNormal, , , , acWindowNormal)

i want to resize it ... i can provide any size (width, hieght, etc)

i dont know the methods or properties to use to implement it





How exactly are you providing the sizes for Form2 within Form1?
Jul 20 '07 #3
ADezii
8,834 Expert 8TB
For example, if i open a form:

Call DoCmd.OpenForm("frm_sub_search_client", acNormal, , , , acWindowNormal)

i want to resize it ... i can provide any size (width, hieght, etc)

i dont know the methods or properties to use to implement it
My favorite Method of resizing a Form is to use the Move Method because you can set the Left, Top, Width, and Height dimensions all within a single command. Rather that provide an explanation, I feel it would be better for you to just view the code. The code will:
  1. Move Form1 - 1 inch from the Left side of the Access Window.
  2. Move Form1 - 1 inch from the Top side of the Access Window.
  3. Adjust the Width of Form1 to 8 inches.
  4. Adjust the Height of Form1 to 5.5 inches.
Expand|Select|Wrap|Line Numbers
  1. Dim frm As Form
  2. Set frm = Forms!Form1
  3.  
  4. 'all measurements are in Twips where 1 inch = 1440 Twips
  5. Const conInchesToTwips = 1440       'easiers to enter measurements in Inches
  6.  
  7. If frm.Moveable Then
  8.   frm.Move Left:=1 * conInchesToTwips, Top:=1 * conInchesToTwips, Width:=8 * conInchesToTwips, _
  9.            Height:=5.5 * conInchesToTwips
  10. Else
  11.   MsgBox "The form cannot be moved."
  12. End If
Jul 20 '07 #4

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

Similar topics

0
by: Tony | last post by:
Derived Forms resizing in dotnet. (Fix) Problem: If you have a form base class: public frmBase : System.Windows.Forms { public frmBase { // DefaultFormFont is new Font("Tahoma", 10);
1
by: Nikhil Patel | last post by:
Hi all, I dynamically create new controls and display them on the form. My problem is that the user has to resize form manually to see controls whose location property points to a point outside...
0
by: Frnak McKenney | last post by:
Environment: OS Name Microsoft Windows 2000 Professional Version 5.0.2195 Service Pack 4 Build 2195 Microsoft Visual C# .NET 2003 Microsoft Development Environment 2003 Version 7.1.3088...
16
by: Naveen Mukkelli | last post by:
Hi, How can we run the app on full-screen. I mean all the controls such as, text boxes, data grids on the form would also be resized or re-located automatically when we press maximize button...
1
by: Andrew Hayward | last post by:
I have a custom form, with all borders, title bar, etc. being drawn internally. Native borders and so on have been disabled. Because of this, however, resizing is a bit of a problem, and generally...
0
by: RCB | last post by:
Can anyone tell me why my client forms will not maximize without showing the max, min and control box? I don't want the client forms to be min/max or be closed by the user but when you max the...
4
by: Jacob.Bruxer | last post by:
I've been unable to find a simple answer to what I initially thought was going to be a simple question. I want to be able to restrict the size of my forms in a VB.net project. I don't want users...
8
by: Tony K | last post by:
How do you maximize a child form when you show the child form. My resolution on my screen is 1440 x 900. My parent form maximizes just fine, but when I show a child form it doesn't maximize. It...
9
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...
1
by: Bob Alston | last post by:
Anyone use the AHRESIZE utility to resize a form dynamically who is also using background images? I have an app that creates electronic versions of manual forms. I digitize the manual form and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.