|
-
Mar 13th, 2000, 05:58 AM
#1
Thread Starter
Lively Member
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?
-
Mar 13th, 2000, 07:02 AM
#2
Frenzied Member
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
-
Mar 13th, 2000, 07:31 AM
#3
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|