Forum Discussion

hiregoudar_maha's avatar
hiregoudar_maha
Occasional Contributor
10 years ago

Not able to set focus on window during run time

Hi,



I am having two screens which is having all properties same expect controlid, operation I want to perform is I want to minimize the backscreen and want to perform operation of front screen but when I tried to minimize the backscreen it is minimizing the front screen.



please let me know how to set focus or activate the backscreen so that the backscreen is minimized.



Thanks,

Mahantesh

5 Replies

  • Are they browsers?



    I had problems getting it to make a specific one the active one. Things like focus and activate never worked. Using the index also wasn't reliable.



    In the end, I had to manually click the page (I just clicked in the top corner at 0,0 - fine for me as there are never any controls up there in my case) in the browser I wanted to force it to become active. Then send it the low level commands (only way I was able to simulate a long keypress in this case) once that browser was active.



    But the browsers had different URL, so I was able to identify each one that way. The problem was simply making the right one become focussed ....
  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    I had windows come up like that, where the first window and the second window were both named Save As.  If the first window was the only one there, it was index =1, but if the second window popped up, it was index = 1 and the original became index =2.  



    I couldn't get a focus or anything on the buttons in the second window until I also referenced the index.
  • hiregoudar_maha's avatar
    hiregoudar_maha
    Occasional Contributor
    Hi,



    Can anyone found the solution other then using "index"???

    please helpme



    Thanks,
  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    Are you saying that your windows don't have Index in the properties?