Solved

Forms and properties

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

772 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