Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CXVSCROLL = 2 'X Size of arrow in vertical scroll bar.
Private Const SM_CYHSCROLL = 3 'Y Size of arrow in horizontal scroll bar
Private Sub Form_Load()
' 添加一个图片框
Dim pic As PictureBox
Set pic = Controls.Add("VB.PictureBox", "pic")
Dim mywidth As Long, myheight As Long