Change the value

Post Reply
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Change the value

Post by Natter »

Hi.

There are 2 apps on FW. App1 and App2. App1 has a dialog box with the TGet control. I use a timer to check the TGet value for changes. I want to change the value of this TGet from App2.

hWn:=FindWindow( ,"The dialog title") //Handle of the dialog App1
hGt:=FindWindowEx( hWn, 0, "Edit" , nil ) //Handle of the TGet App1

SetWindowText(hGt, "2") //changing the TGet value

The GetWindowText(hGt) function determines that the TGet value has changed. However, checking in App1 doesn't see any changes. If I use TSay, then everything is fine. Why is this ?
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Change the value

Post by anserkk »

What about copying the value of TGet of App1 to ClipBoard and then in the App2 read the value from the clipboard and then paste into the corresponding TGet ? Just an idea
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Re: Change the value

Post by Natter »

Hi, Anserkk !

Yes, I can also use the clipboard. In this case, I wanted to use TGet as an indicator of accesses to App1. I solved it this way - inserted the handling of requests from App2 in the HandleEvent method of the App1 dialog box. Everything works
Post Reply