forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


ExtFileDlg w/Image Preview - Extension

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Feb 21, 2006 7:23 pm    Post subject: ExtFileDlg w/Image Preview - Extension Reply with quote

ExtDlg.DLL is a VDS implementation of Delphi's TOpenDialog, TSaveDialog, TOpenPictureDialog and TSavePictureDialog functions. Basically it's an extended version of VDS's "@FileDlg" function.

Extended Features include:
1. Thumbnail image preview pane on the file browser dialog
2. Full-size/resizable image preview window
3. Hide or show the "Places Bar"
4. Set initial browser directory
5. Set initial browser file filter index
6. Set default return extension (save type dialogs)


This package includes three separate builds of the extension all have the same functionality but support different graphic file formats:

ExtDlg.dll Supports 6 formats:
(*.bmp; *.emf; *.ico; *.jpeg; *.jpg; *.wmf)

ExtDlg8.dll Supports 8 formats:
(*.bmp; *.emf; *.gif; *.ico; *.jpeg; *.jpg; *.png; *.wmf)

ExtDlg40.dll Supports 40 formats:
(*.bmp; *.bw; *.cel; *.cut; *.dib; *.emf; *.eps; *.fax; *.gif; *.icb; *.ico; *.jfif; *.jpe; *.jpeg; *.jpg; *.pbm; *.pcc; *.pcd; *.pcx; *.pdd; *.pgm; *.pic; *.png; *.ppm; *.psd; *.psp; *.rgb; *.rgba ;*.rla; *.rle; *.rpf; *.scr; *.sgi; *.tga; *.tif; *.tiff; *.vda; *.vst ;*.win; *.wmf)

I've also included the Delphi source code incase you would like to customize or adapt the extension's functions for another use. This code is part of a larger graphics extension I've been working on between paying projects. The next release will include an image element and several image editing, filtering and conversion routines.

New Version 1.1 R2
Changes:
1. Resolved non-existent file issue with Open Dialogs
2. Added "Overwrite Existing File" prompt to Save Dialogs


Download Link:
http://www.twpro.com/pub/ExtDlg2.zip



Extdlg.jpg
 Description:
 Filesize:  131.76 KB
 Viewed:  2059 Time(s)

Extdlg.jpg




Last edited by WidgetCoder on Thu Mar 09, 2006 10:17 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Tue Feb 21, 2006 7:53 pm    Post subject: Reply with quote

That is way to cool. I cant wait for the image edit part.. excellent work.
Back to top
View user's profile Send private message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Feb 21, 2006 9:50 pm    Post subject: Reply with quote

Thank you.. It should be out around the time VDS 6 is released Laughing Just kidding..
Back to top
View user's profile Send private message Send e-mail
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Tue Feb 21, 2006 10:47 pm    Post subject: Reply with quote

WidgetCoder wrote:
Thank you.. It should be out around the time VDS 6 is released
Oh well... will just have to install it on the retirement centre PC. Crying or Very sad
_________________
John Trappett
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Feb 23, 2006 8:36 am    Post subject: Reply with quote

Nice addition to VDS, WidgetCoder Smile I'm sure I'll be using this DLL in some future projects Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Mar 05, 2006 5:58 pm    Post subject: Reply with quote

Nice work Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Tue Mar 07, 2006 4:53 am    Post subject: Reply with quote

Is it possible to return the extension of the selected image or file from the combo box? I.e. If the user selects JPG images (*.jfif;*.jpe;*.jpeg;*.jpg) from the combo box in the save dialog and only types the file name, that we could tell that .jpg was selected and apply that to the file name. Know what I mean?

Thx

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Thu Mar 09, 2006 5:31 pm    Post subject: Reply with quote

Chris, Good Catch ! I hadn't considered that. We could grab what's in the combo but the problem is if it's a group of file extensions which one do we use? The class this is derived from does however offer an option property to reject the filename if the file doesn't exist and display a warning message to the user. I could easily add this option to all of the "open" style dialogs. What are your thoughts?

Quote:

ofFileMustExist Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Thu Mar 09, 2006 7:04 pm    Post subject: Reply with quote

I would suggest to use the most common file type. like JPG images (*.jfif;*.jpe;*.jpeg;*.jpg) you would use JPG and for Truevision images (*.icb;*.tga;*.vda;*.vst;*.win) use TGA. I think that would work. For the other formats, we can just inform the user to specify the extnsion otherwise the default would be used...or, make an option to let us choose what we want the default for that group to be...something like

OPTION EXTDLG, <image/file group>,<default extension>

so it would look like

OPTION EXTDLG,Truevision,TGA

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Thu Mar 09, 2006 7:27 pm    Post subject: Reply with quote

I thought about doing that exact thing but then realized using an open dialog if the actual file is some.tiff you would get some.tif instead. I think I've worked my way past that problem now with the version I'm on. I also forgot to include "Overwrite existing file" asks for the save style dialogs. I should have an updated version to post today.

Thank you for showing me the error of my ways Worship


Last edited by WidgetCoder on Thu Mar 09, 2006 10:18 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Thu Mar 09, 2006 9:00 pm    Post subject: Updated ExtDlg.dll version Reply with quote

New Version 1.1 R2
Changes:
1. Resolved non-existent file issue with Open Dialogs
2. Added "Overwrite Existing File" prompt to Save Dialogs

Download:
http://www.twpro.com/pub/ExtDlg2.zip

Thanks again for your help Chris Smile

Bill
Back to top
View user's profile Send private message Send e-mail
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Fri Mar 10, 2006 10:48 am    Post subject: User defined Preview ?? Reply with quote

Hi !

I just had a thought. Let's say that I wanted to add a preview of MPEG and AVI files through a VDS user command.

I imagine it would go something like this:

Code:

#define command,EXTDLGPREVIEW

# Register the name of the user command to call
OPTION EXTDLG,CMDNAME,EXTDLGPREVIEW
# Register file types that EXTDLGPREVIEW will be used for
OPTION EXTDLG,FTYPES,avi|mpg|mpeg
# Register the class name of the VDS-based preview dialog (so that EXTDLG will close it (if it exists) before calling the EXTDLGPREVIEW command)
OPTION EXTDLG,WINDOW,#EXTDLGPRV

# Show the EXTDLG dialog
%F = @extdlg(....)
...
stop

# EXTDLG should send the file is first parameter
:EXTDLGPREVIEW

%E = @ext(%1)

if @equal(%E,avi)

# Create a dialog for the preview
DIALOG CREATE,Movie Preview,100,100,100,100,,CLASS EXTDLGPRV
dialog add,...
dialog show

elsif @equal(%E,mpeg)@equal(%E,mpg)

DIALOG CREATE,Movie Preview,100,100,100,100,,CLASS EXTDLGPRV
dialog add,...
dialog show
end
# The exit statement should return the control to the DLL
exit



Would this be possible in a future version ? Or maybe it may be achieved in some other manner ?


Henrik
[/code:1:c0eef0aef2]
Back to top
View user's profile Send private message Send e-mail
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Fri Mar 10, 2006 8:19 pm    Post subject: Re: User defined Preview ?? Reply with quote

henrywood wrote:
Hi !

I just had a thought. Let's say that I wanted to add a preview of MPEG and AVI files through a VDS user command.



I'm a bit confused on what you're looking for here. A thumbnail representation for movie types similar to explorer's thumbnail view or actually running the file in a media control on the OpenDialog? Also keep in mind that it's a modal dialog so your script will halt any further execution until the dialog has been closed.

BTW: could you place a carriage return in you previous post? I'm having to use the horizonal scroll bar to read the full page.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group