Results 1 to 4 of 4

Thread: might be easy

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    48

    might be easy

    Hello there!
    The problem i have might be simple, but i have given up looking.
    I have a form and a textbox inside it. when i run the form and resize the form i want the textbox to resize 2. I tried form resize n this is the code i have

    Private Sub frmTestPad_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
    txtNewDocument.Top = 100
    txtNewDocument.Left = 100
    txtNewDocument.Width = frmTestPad.ActiveForm.Width - 300
    txtNewDocument.Height = frmTestPad.ActiveForm.Height - 600
    End Sub

    and this is the error i get-"Object reference not set to an instance of an object"
    Thanks in advance..
    Last edited by dawgfather; Mar 25th, 2004 at 10:16 PM.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    First , try this setting for the textbox :

    Anchor : Top, Left, Right

  3. #3
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    Also, you'll need to set the "multililne" property to "true"

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    48
    cool thanks guys it works....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width