cancel
Showing results for 
Search instead for 
Did you mean: 

Common Item Dialog & PB Classic

Former Member
0 Kudos

Has anyone developed a way for PB Classic (any recent version) to utilize the Windows Common Item Dialog (aka Common File Dialog) window for file open/save selection in place of the traditional GetFileOpenName and GetFileSaveName PowerScript functions? If so, I would very much like to hear from you!

Microsoft introduced the Common Item Dialog in Vista - it supercedes the Win95-era common file dialog windows.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190719
Active Contributor
0 Kudos

Also, Roland Smith has a version on his Topwiz Software site that calls the Windows API directly from PB.

former_member190719
Active Contributor
0 Kudos

What version of PowerBuilder are you using?  A flag argument was added to the GetFileOpenName and GetFileSaveName methods some time back that allowed you to customize the resulting dialog.

Unfortunately, that doesn't allow you to modify the OFN_EX_NOPLACESBAR flag, which you might be looking for.  If that is the case, you might check out a PBNI extension I put on CodeXchange called pbnicommondialog.  It uses the Windows API GetOpenFileName and GetOpenSaveName methods and allows you to set all the flags (among other things).

Former Member
0 Kudos

Thank you for responding, Bruce. We will soon be migrating our commercial app to 12.5.1 Classic. I'm really not looking for ways to customize the Open/SaveAs dialogs as much as I am looking to modernize them. It appears that the folks in Redmond did just that to the old Common Dialogs by creating the Common Item Dialog, so I'm searching for a way to be able to use it.

The GetFileOpenName/GetFileSaveName style of Common Dialog windows was created in an era when most monitors were 640x480 or 800x600; they are unnecessarily tiny and therefore cramped - the number of folders/files you can see at one time is small. As you've noted, the ability to customize them is very limited...It's a 15+ years-old user interface component that sorely needs to be brought up to date.

Of course, the same can be said for just about all of the user interface capabilities and base functionality in PB...menus, toolbars, window styles, dock-able panes (the lack thereof in PB Classic), native PDF generation (sans GhostScript), graphing capabilities...the list of antique-looking GUI components in PB Classics is long and my patience from having to grit my teeth and live with it  is nearly gone.

Boy, it sure would be nice to have some idea where PB is headed (hint, hint)!

former_member190719
Active Contributor
0 Kudos

Oh snap!  You meant this.  I thought you meant this.  Let me take a look, perhaps we can write a wrapper for it.

former_member190719
Active Contributor