I have a borderless form with a richtextbox. When the rtb is loaded how can i make the form height match the rtb height.
This does not work:
me.height = rtb.height the form does not expand high enough
Printable View
I have a borderless form with a richtextbox. When the rtb is loaded how can i make the form height match the rtb height.
This does not work:
me.height = rtb.height the form does not expand high enough
The form should not be matching to the richtextbox....the richtextbox should be matching to the form.
Whar are you actually trying to accomplish? Do you want the form to be the same size as the rtb? If you just want the form's height to be the same then the rtb should be at 0.
Does this do it for you?
Code:Private Sub Form_Load()
RichTextBox1.Top = -20
Me.Height = RichTextBox1.Height
End Sub
ok here's what i got
I am loading a rtb from another rtb on another form and i am able to match the height of the 2nd rtb to it's contents. Like in this articule:
http://support.microsoft.com/kb/q257849/
i then plan on saving the form image as a jpg