Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Position Picture on MDI

Posted on 2008-10-12
2
Medium Priority
?
227 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Suggested Courses

604 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