ll.Height) \
       Screen.TwipsPerPixelY + 8
      lMaxWidth = mfrmMain.ScaleWidth
      lMaxHeight = mfrmMain.ScaleHeight
      If (m_cDib.Width + lExtraX) * Screen.TwipsPerPixelX &lt; lMaxWidth Then
         If (m_cDib.Height + lExtraY) * Screen.TwipsPerPixelY &lt; lMaxHeight Then
            lLeft = Me.Left
            lTop = Me.Top
            If lLeft + (m_cDib.Width + lExtraX) * Screen.TwipsPerPixelX &gt;
             lMaxWidth Then
               lLeft = lMaxWidth - (m_cDib.Width + 12) * Screen.Twip