|
-
Nov 6th, 2000, 10:56 AM
#1
Thread Starter
Lively Member
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?
-
Nov 6th, 2000, 11:17 AM
#2
Frenzied Member
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
-
Nov 6th, 2000, 01:33 PM
#3
Frenzied Member

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
-
Nov 7th, 2000, 03:00 AM
#4
Thread Starter
Lively Member
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
-
Nov 7th, 2000, 03:20 AM
#5
Frenzied Member
You're welcome, Fedor. Glad to be of some help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|