troubleshooting Question

Centering mid child form Problem.

Avatar of emi_sastra
emi_sastra asked on
Visual Basic Classic
8 Comments1 Solution293 ViewsLast Modified:
I have an vb 6 project with a mdi form and several mdi child forms. In the load event of the mdi child form
I do the coding such as:

me. width = 6000
me. height = 1000

call CenterForm (this function center the mdi child form against its mdi form).

The problem is sometimes it works fine. But sometime strange things happened when I call it several times for example:

First call, it works fine and then I close the form.
Second call, the top of the form is lower then the first call and so on for the next call.

What I should do in coding to my problem from showing the form till closing the form ?

Thank you.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros