Results 1 to 5 of 5

Thread: TextBox question..[Resolved - thx bruce]

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    7

    TextBox question..[Resolved - thx bruce]

    I'm using the TextBox control from the "Microsoft Forms 2.0" designer(because it can be transparent) and i want to be able to press for instance a command button and have the textbox scroll. Well unlike normal textbox's there is no TextBox1.hwnd (like Text1.hwnd of normal ones). How do i get the hwnd of this type of textbox?

    VB Code:
    1. Const EM_LINESCROLL = &HB6
    2.  
    3.       Private Declare Function SendMessage Lib "user32" Alias _
    4.       "SendMessageA" _
    5.          (ByVal hWnd As Long, _
    6.           ByVal wMsg As Integer, _
    7.           ByVal wParam As Integer, _
    8.           ByVal lParam As Long) As Long
    9.  
    10. Private Sub Command1_Click()
    11.          Dim lngRet As Long
    12.  
    13.          lngRet = SendMessage([B]TextBox1.hwnd[/B], EM_LINESCROLL, 0, 5&)
    14.       End Sub

    This works on a normal textbox but since the TextBox1 doesn't have a .hwnd property i have no idea how to find the .hwnd of the textbox. WELL thanks in advance!
    Last edited by TuckWat; Dec 11th, 2003 at 02:24 PM.
    Tucker Watson

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