- Mario Parietti
- PowerBuilder
- Friday, 27 November 2020 03:50 PM UTC
Good morning
I am trying to activate my powerbuilder application while working on another (non powerbuilder) application.
What I have to do is, when the second application write a file in a predefined folder, my PB application must consume the file activating itself, and becaming the actual active window application.
I tried whit this code:
unsignedlong hwnd
hwnd = FindWindow(0, "My PB App")
SetForegroundWindow(hwnd)
using these API declaration:
PUBLIC FUNCTION unsignedlong FindWindow (long classname, string windowname) LIBRARY "user32.dll"
FUNCTION BOOLEAN SetForegroundWindow( LONG HWND ) LIBRARY "USER32"
but it doen't work.
Any suggestion?
Thanks in advance.
Mario
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.