Solved

Position Picture on MDI

Posted on 2008-10-12
2
207 Views
Last Modified: 2013-12-26
Hi,

I have a Picturebox sitting to the right side of an MDI. Another Picturebox sits on it. I need the 2nd picturebox to reposition to the bottom right corner of the MDI depending on screen size. Can someone help with some code, please.

Thanks.
0
Comment
Question by:tvtech
2 Comments
 
LVL 22

Accepted Solution

by:
danaseaman earned 250 total points
ID: 22699690
Code to align Picture2 bottom right within Picture1.

Option Explicit
 

Private Sub MDIForm_Resize()

   Dim Wi As Long

   Dim He As Long

   

   With Picture1

      Wi = .ScaleX(.ScaleWidth, .ScaleMode, vbTwips)

      He = .ScaleY(.ScaleHeight, .ScaleMode, vbTwips)

      Picture2.Move Wi - Picture2.Width, He - Picture2.Height

   End With
 

End Sub

Open in new window

0
 

Author Closing Comment

by:tvtech
ID: 31505526
danaseaman, perefect! Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

867 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