Change the value

Change the value

Postby Natter » Thu Nov 19, 2020 2:54 pm

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 ?
Natter
 
Posts: 1222
Joined: Mon May 14, 2007 9:49 am

Re: Change the value

Postby anserkk » Fri Nov 20, 2020 5:44 am

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
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Change the value

Postby Natter » Fri Nov 20, 2020 7:26 am

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
Natter
 
Posts: 1222
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 74 guests