Solved

Position Picture on MDI

Posted on 2008-10-12
2
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 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