Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Forms and properties

Posted on 2002-03-09
4
Medium Priority
?
171 Views
Last Modified: 2010-05-02
I have a form where I have added my own property, basically a report type.  I have 3 different frames hidden on the form based on the report type.  In the development view the form is very wide.  When it comes up in the run-time environment I change the size to make it smaller.  However, I'm getting a flickering of the original size (which I don't want).  How can I get rid of this?

Thanks,
0
Comment
Question by:srobia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Expert Comment

by:inthedark
ID: 6853513
Are you changing the size in the form_load event ?
0
 

Author Comment

by:srobia
ID: 6853723
no -- would that affect it?
0
 
LVL 2

Expert Comment

by:PeteD
ID: 6854604
Put all your resize code in a separate sub eg.

Public Sub ResizeTheForm()
  'do all your resizing here
End Sub

Then before you show the form call this e.g.

Load frmYourForm
frmYourForm.ResixeTheForm
frmYourForm.Show
0
 

Accepted Solution

by:
MikeBAM earned 150 total points
ID: 6855866
Make the form the size you want it at design time. Write down the Width property.  Then make the form the size you want it to be when you run the program.  Then write down that Width. And then type back in the other Width (the design time one) so you can put it back how you want it. Then in 'Private Sub Form_Load()' Right under that the very first thing, Before even showing the form, Put Me.Width = (the run time size here)
That should do it.
If not, you can try Hiding the form right away as the 1st thing. (Me.Hide) then change the Width of the form. then show the form (Me.Show)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question