Solved

Forms and properties

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now