...forse una cosa così:
Private PictureBox1 As PictureBox
Private PictureBox2 As PictureBox
Private Panel1 As Panel
Private Separator1 As Separator
Private im As Image
Public Sub Form_Open()
With PictureBox1 = New PictureBox(Me) As "PictureBox1"
.X = 100
.Y = 100
.Image = Image.Load("/percorso/del/primo/file/immagine")
.W = .Image.W
.H = .Image.H
End With
im = Image.Load("/percorso/del/secondo/file/immagine")
With PictureBox2 = New PictureBox(Me) As "PictureBox2"
.X = 100
.Y = 100
.Image = im
.Image = .Image.Stretch(PictureBox1.W, PictureBox1.H)
.Image = .image.Resize(.Image.W / 2, .Image.H)
.W = .Image.W
.H = .Image.H
End With
With Separator1 = New Separator(Me) As "Separator1"
.X = PictureBox1.X + (PictureBox1.W / 2) - 2
.Y = PictureBox1.Y
.W = 1
.H = PictureBox1.H
.Background = Color.ButtonBackground
End With
With Panel1 = New Panel(Me) As "Panel1"
.X = (PictureBox1.X + (PictureBox1.W / 2)) - .W - 1
.Y = PictureBox1.Y + PictureBox1.H * 0.3
.W = 16
.H = 16
.Background = Color.ButtonBackground
End With
End
Public Sub Panel1_MouseMove()
With Panel1
.Move(.X + Mouse.X - Mouse.StartX, .Y + Mouse.Y - Mouse.StartY)
If .X + (.W / 2) < PictureBox1.X Then .X = PictureBox1.X - (.W / 2)
If .X + .W > PictureBox1.X + PictureBox1.W Then Panel1.X = PictureBox1.X + PictureBox1.W - (.W / 2)
.Y = PictureBox1.Y + PictureBox1.H * 0.3
End With
Separator1.Move(Panel1.X + 8, Separator1.Y)
With PictureBox2
.Image = im
.Image = .Image.Stretch(PictureBox1.W, PictureBox1.H)
.Image = .Image.Resize(Separator1.X, .H)
.Resize(Separator1.X - .X, .H)
.Image = .Image.Resize(.W, .H)
End With
End