Solved

Forms and properties

Posted on 2002-03-09
4
164 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
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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

685 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