Skip to main content
1-Visitor
August 18, 2011
Question

How to set size of TextBox control with code?

  • August 18, 2011
  • 3 replies
  • 2096 views

Hi Mike,

As we known, we can use hWnd property to get handle of the window which contains the TextBox control. Bu if I want to set the size (such as width and height) of the TextBox control , I do not know how to implement the function with code. Please give me a hand.

There is a file in the attachment, which contains two TextBox controls, and I have gotten window handles for each control.

Best regards.

Jeffery

3 replies

1-Visitor
August 18, 2011

I have to admit that I have never seen this done before.

Mike

1-Visitor
August 18, 2011

I done a little research on this today and there is a lot of discussion about setting the width and height automatically. Might be best searching through Google and finding a forum dedicated to VB.

Mike

19-Tanzanite
August 18, 2011

I want to set the size (such as width and height) of the TextBox control

I don't think there is any way to do that.