27 August 2022

How to Identify Powerbuilder Application Running Mode

If you are a Powerbuilder Application Developer, there is a nice tips to identify whether our Application is running from within PB IDE or not.

Therefore, we can put some codes in Powerbuilder App and run the code only if our Application running from within PB IDE, otherwise it will not executed.

If Handle(GetApplication())=0 then 

//Running from PB IDE

Else

//Running from Executable file

End If

For example, when it is running from PB IDE, we can inject User and Password in Login Form so we do not need to enter User and Password everytime we run our App during testing/development phase.

If Handle(GetApplication())=0 then 

sle_user.text = 'admin'

        sle_password.text = '123456'

        cb_ok.TriggerEvent (Clicked!)

End If

No comments:

Post a Comment