-
Hoi,
On run-time I would like to have a textbox that can be modified by the user.
Dragging the object to another place is possible, but how do I change the width and height?
Fedor
If swimming makes you slim, then what the hell is wrong with the whales?
-
This is a possibility:
Assume you have your text box and a check box that, when checked, will allow your user to resize the text box in question. You could enable the resize any way you like. This is just a suggestion. When the check box is checked, the text box will resize to wherever the user clicks on the form.
Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Check1.Value = vbChecked Then
Text1.Width = Abs(X - Text1.Left)
Text1.Height = Abs(Y - Text1.Top)
End If
End Sub
-
:cool:
This gives a cool effect also:
Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
If X > Text1.Left And Y > Text1.Top Then
Text1.Width = X - Text1.Left
Text1.Height = Y - Text1.Top
End If
End If
End Sub
-
You Cool = True
Thanks,
this works almost like I had in mind, with some changes (in code or in thoughts) I will have exactly what I want, thanks !
Fedor
-
You're welcome, Fedor. Glad to be of some help.