Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Open File Dialog in Enhancements Pack

Author
Message
Pankratz
21
Years of Service
User Offline
Joined: 26th Jun 2003
Location: Draper, UT
Posted: 21st May 2005 05:03
Is there a way to make the dialog box -- created by the "Open File Dialog" or "Save File Dialog" command in the Enhancements Pack --always on top?

Also, the dialog boxes will either show every file in the directory or will show none -- c.-à-d., the filter is not working. This tends to be sporadic; it will change without me changing any code. How do I fix this? I am using the following code:



I have also tried:



Thanks
BealziBob
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location: The Grim North (UK)
Posted: 21st May 2005 10:55 Edited at: 21st May 2005 11:03
You have the filters set incorrectly. Try replacing your filter string with something like this:

"Text Files (*.txt)|*.txt|All Files (*.*)|*.*"

[Edit] Just looked at the expansion help file and it does not describe this, so i can see why you got lost. I learned this from Rob K's Blue 2 plugin which has a similar command, with much better documentation.

Pankratz
21
Years of Service
User Offline
Joined: 26th Jun 2003
Location: Draper, UT
Posted: 21st May 2005 12:49
It is still doing the same thing -- either showing everything or nothing. Using the above example, the entire string, "Text Files (*.txt)|*.txt|All Files (*.*)|*.*" is shown in the drop box -- I'm assuming the "|.txt|" and "|*.*" should not be displayed.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st May 2005 17:02
As an alternative, you can use this function I wrote prior to the Enhancements pack being released;




Just drop all that into a dba file, include it, and call the _open_save function

Works flawlessly in 5.8 too

Here's a really simple example of how it works;



Easy

Jess.


Team EOD :: All-Round Nice Guy
dbHelp
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2005 20:33
The syntax which works for my plugin is probably not applicable to the extensions pack plugin.

In the C code behind this, a null character (chr$(0)) is used to separate each part of the filter. My plugin uses the pipe character since that is easier for DBPro programmers to input (the plugin then replaces the pipe with null characters before passing it to windows)


BlueGUI Windows Plugin
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st May 2005 22:02
...Exactly like what mine does

Team EOD :: All-Round Nice Guy
Want Better dbHelp Files?
Pankratz
21
Years of Service
User Offline
Joined: 26th Jun 2003
Location: Draper, UT
Posted: 22nd May 2005 04:58
Jess,

I just tried your code -- works flawlessly!! It's exactly what I needed; thank you!

Login to post a reply

Server time is: 2025-05-31 00:56:24
Your offset time is: 2025-05-31 00:56:24