Alternative to PowerScript function GetFolder() + start path and create folder
Bas Oversteegen
CODE AUTHOR
Posts: 2
Bas Oversteegen created the code: Alternative to PowerScript function GetFolder() + start path and create folder
GetFolderDialog() is an alternative to GetFolder() and is based on WinAPI IFileOpenDialog. Would be nice if PowerBuilder could provide something like this as a standard PowerScript function. Visual Studio 2017 getfolderdialog.dll sources (GetFolderDialog and GetFolderDialog_test solution) attached. See '.\GetFolderDialog\pb' for PB 12.5 example app. See doc dirs for VS project configuration and compilation instructions.
This message has an attachment file.
Please log in or register to see it.
Last Edit: 4 years 3 months ago by Bas Oversteegen . Reason: Changed license from GNU to Apache for free usage, changed PB 2019 R2 example app to PB 12.5 example app
Please Log in or Create an account to join the conversation.
Stephan Schröpel
Posts: 2
Stephan Schröpel replied the code: Alternative to PowerScript function GetFolder() + start path and create folder
Thank you so much, Bas!!!
It works fine and looks much better than before using PB GetFolder()!
I added an alias at the end of the external Funktion Declaration and now i can use 32 or 64 call, depending of the environment.
Greetings and have a nice weekend
Stephan
It works fine and looks much better than before using PB GetFolder()!
I added an alias at the end of the external Funktion Declaration and now i can use 32 or 64 call, depending of the environment.
Greetings and have a nice weekend
Stephan
Please Log in or Create an account to join the conversation.
Bas Oversteegen
CODE AUTHOR
Posts: 2
Bas Oversteegen replied the code: Alternative to PowerScript function GetFolder() + start path and create folder
Hi Stephan,
Attached the 64-bit getfolderdialog_x64.dll with PB test app. The test app was coded in PB2017. The .dll should:
* run/debug in a PB2022 IDE if you set option Platform in menubar to 'x64' (it does not run/debug in the IDE of lower PB versions)
* work correctly in application executables built for platform 64-bit in PB2017 or higher.
Tested in PB2017 (executable only), PB2019 (executable only) and PB2022 (executable and IDE).
Greetings, Bas.
Attached the 64-bit getfolderdialog_x64.dll with PB test app. The test app was coded in PB2017. The .dll should:
* run/debug in a PB2022 IDE if you set option Platform in menubar to 'x64' (it does not run/debug in the IDE of lower PB versions)
* work correctly in application executables built for platform 64-bit in PB2017 or higher.
Tested in PB2017 (executable only), PB2019 (executable only) and PB2022 (executable and IDE).
Greetings, Bas.
This message has an attachment file.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
Stephan Schröpel
Posts: 2
Stephan Schröpel replied the code: Alternative to PowerScript function GetFolder() + start path and create folder
Hi Bas,
thank you for this code. Is there also an additional .dll for 64 bit? I didn't find anything on the web or visual studio.
Best regards from Germany
Stephan
thank you for this code. Is there also an additional .dll for 64 bit? I didn't find anything on the web or visual studio.
Best regards from Germany
Stephan
Please Log in or Create an account to join the conversation.