Results 1 to 3 of 3

Thread: Help Me

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Post

    If i have 2 exe's and i want to change the value of a tect box from one exe to the other one knowing the hwnd, how can i do that?

  2. #2
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Post Try this...

    Use the SetWindowText API function...

    If you know the handle of the textbox, it's a snap.

    In a module:
    Code:
    Option Explicit
    
    Public Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" _
        (ByVal hWnd As Long, ByVal lpString As String) As Long
    For this example, create a textbox (Text1) and a command button (Command1). Then in the form's code window, paste this:
    Code:
    Private Sub Command1_Click()
        SetWindowText Text1.hWnd, "Hello"
    End Sub
    Pretty, cool, huh? It will set the title of regular windows, or the text property of a textbox window.

    Hope that helps!

    ~seaweed

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Post seaweed:

    What i realy need is to manipulate all the controls of the form knowing only the hwnd of the form because the form have alot of controls.
    Something like to create a object form to manipulate all the controls knowing only the hwnd of the form

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