Imports System.Drawing Imports System.Windows.Forms Public Class UserControl1 Private MousePoint As Point Private MouseDownSize As Size Private senderPictureBox As PictureBox Private Sub FCHandle_UC_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call CtrlSyoki() End Sub Private Sub CtrlSyoki() Me.BackColor = Color.Black For Each c As Control In Me.Controls If 0 < InStr(c.Name, "PictureBox") Then c.Width = 10 : c.Height = 10 : c.BackColor = Color.Yellow End If Next With PictureBox1 '左上 .Left = 0 : .Top = 0 End With With PictureBox2 '上 .Left = Me.Width / 2 - .Width / 2 : .Top = 0 End With With PictureBox3 '右上 .Left = Me.Width - .Width : .Top = 0 End With With PictureBox4 '左 .Left = 0 : .Top = Me.Height / 2 - .Height / 2 End With With PictureBox5 '右 .Left = Me.Width - .Width : .Top = Me.Height / 2 - .Height / 2 End With With PictureBox6 '左下 .Left = 0 : .Top = Me.Height - .Height End With With PictureBox7 '下 .Left = Me.Width / 2 - .Width / 2 : .Top = Me.Height - .Height End With With PictureBox8 '右下 .Left = Me.Width - .Width : .Top = Me.Height - .Height End With End Sub Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles _ PictureBox1.MouseDown, PictureBox2.MouseDown, PictureBox3.MouseDown, PictureBox4.MouseDown, _ PictureBox5.MouseDown, PictureBox6.MouseDown, PictureBox7.MouseDown, PictureBox8.MouseDown If e.Button = Windows.Forms.MouseButtons.Left Then MousePoint = New Point(e.X, e.Y) : Call HandleHide(True) MouseDownSize = Me.Size senderPictureBox = sender End If End Sub