Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing a textBox when i resize the window 1

Status
Not open for further replies.

adi316

Programmer
Sep 10, 2002
35
CA
I got a textbox, and i want it to auto resize as i change the size of the window. As it is now it stays the same size even when i maximize (the grey area just gets larger, which doesnt help at all!!) TIA!!
 
Easiest way is to spend a little money on a resize control which will resize all the objects on a form when you change the form size, the one I use is Resize.ocx from Larcom & Young you just put it on the form and it does the rest no code required, costs about £40, but there are plenty others out there.

Or you could spend ages writing your own code if you really want Gary Parker
Systems Support Analyst
 

Here is an example for a richtextbox on a form with a toolbar and status bar.

[tt]Private Sub Form_Resize()
If Me.WindowState <> vbMinimized Then
RTB.Left = 30
RTB.Top = 450
RTB.Width = Me.Width - 150
RTB.Height = Me.Height - 1450
End If
End Sub
[/tt]

I think you could customize it for what you need it for.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top