Results 1 to 2 of 2

Thread: Text Boxes!

  1. #1
    Mine_23
    Guest

    Question

    Hello;
    Suppose I have a text box in a form not in my Project and it has a password char and I know it's handle. how to get the password behind the mask! (using API)

    I had tried the EM_GETLINE message but I got a critical error, why?

  2. #2
    Guest
    Use the GetwindowText function.
    Code:
    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    
    Private Sub Command1_Click()
        Dim sText As String * 255
        Dim iLength As Integer
        iLength = GetWindowText(MyTextBox.hWnd, sText, 255)
        'Trim the string
        sText = Left(sText, iLength)
        
        MsgBox sText
    End Sub

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