Ik heb laatst nog een scrippie ervoor gepost, zelf gemaakt, zonder api. FF w88, beetje zoeken...
Hier!
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| Private Sub StretchCorner_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
StretchCornerX = x
StretchCornerY = y
End If
End Sub
Private Sub StretchCorner_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
If Me.Height + y - StretchCornerY <= 300 * Screen.TwipsPerPixelY + TopBarLeftBox.Height + BottomBarBox.Height Then
Me.Height = 300 * Screen.TwipsPerPixelY + TopBarLeftBox.Height + BottomBarBox.Height
Else
Me.Height = Me.Height + y - StretchCornerY
End If
If Me.Width + x - StretchCornerX <= 400 * Screen.TwipsPerPixelX + LeftBackImage.Width + RightBackImage.Width Then
Me.Width = 400 * Screen.TwipsPerPixelX + LeftBackImage.Width + RightBackImage.Width
Else
Me.Width = Me.Width + x - StretchCornerX
End If
End If
End Sub |
Waarbij 300 en 400 de kleinst mogelijke hoogte en breedte in pixels is...
Owja, ik gebruik die move-api nooit, als je hem namelijk vastpakt terwijl je je muis snel verplaatst, staat de cursor niet meer op het plaatje zelf, maar erboven/onder/etc. Ik gebruik hier dit script voor:
code:
1
2
3
4
5
6
7
8
9
10
11
12
| Private Sub TopBarNameBox_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
StretchCornerX = x
StretchCornerY = y
End If
End Sub
Private Sub TopBarNameBox_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
Me.Move Me.Left + x - StretchCornerX, Me.Top + y - StretchCornerY
End If
End Sub |