1. marco gaspar
  2. PowerBuilder
  3. Wednesday, 4 March 2020 18:26 PM UTC

Good afternoon!
How do I bring a PowerBuilder screen into focus even if the user clicks off the screen?

Thanks

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 4 March 2020 18:36 PM UTC
  2. PowerBuilder
  3. # 1

Hi Marco;

  PB's Window Class has a Deactivate event. In that event, POST back to the current window a SetFocus().

  • THIS.Post Event SetFocus()

 An alternative to the above is ...

  • THIS.Post Function SetPosition ( TopMost! )

HTH

Regards ... Chris

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 4 March 2020 18:56 PM UTC
  2. PowerBuilder
  3. # 2

Chris is right. This is all you need:

// Window's DEACTIVATE event
this.POST SetFocus( )

 

WARNING:

Whenver ANY code displays MessageBox or some kind of Response window => That box or window will temporarily take over focus -- until user or app closes that "MODAL" dialog. - - THEN focus shifts back to your desired window.

HTH /Michael

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.