Re: Save file Dialog API question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Steve Easton" <admin@xxxxxxxxxxxxx> wrote in message
news:O$LozIJmFHA.268@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Sam.
>
> I'm using the Open Save dialog API from Randy's site.
>
> I can preload the file name that is displayed in Save As by using this:
> .sFile = "filename.bmp" & Space$(1024) & vbNullChar & vbNullChar
>
> I then use:
> SavePicture Picture2.Picture, OFN.sFile ( where Picture2 is the handle to
> a PictureBox )
> to write the file.
>
> However, nothing prevents the user from changing the name and leaving off
> the extension.
> However, If the user simply clicks Save, then the file is saved with the
> name in .sFile

However, nothing prevents you from changing the name and adding/changing the
extension, correct? You would do this prior to the SavePicture. You could
use a MsgBox to inform and/or ask the user about doing that.

Hopefully you understand that now. You seem to have not realized that you
could. You probably have learned more about how the Open and Save Common
Dialogs work. They don't actually open the file for you; they just help you
get the filenames.


.



Relevant Pages

  • Re: Save file Dialog API question
    ... >> Hi Sam. ... >> I can preload the file name that is displayed in Save As by using this: ... >> the extension. ... I've used the file api in other projects. ...
    (microsoft.public.vb.winapi)
  • Re: Is Direct3D a rip-off of OpenGL?
    ... > For me it has nothing to do with daunting, it is a messy spot in the API. ... > an 'old extension mechanism' and a 'nice new one' the old one was kept. ... OpenGL is like adding garbage collection to the C++ core language - why ... >> standard API if everybody has their own wrappers for it? ...
    (comp.graphics.api.opengl)
  • Re: TIP#308: Last serial column value generated
    ... I maintain fbsql, a MySQL TCL extension. ... If the TDBC defined an async API I would probably follow it's design. ... The fbsql extension is in the public domain. ...
    (comp.lang.tcl)
  • Re: [ANNOUNCE] [dict] command backport for tcl8.4
    ... > C API as provided by Tcl-8.5, with the note that the C API is not binary ... > * The extension export a stubs table, ... If there are no volunteers, the first user will have to ... how would I use the stubs? ...
    (comp.lang.tcl)
  • Re: Is Direct3D a rip-off of OpenGL?
    ... >> a disaster is the implementation of said mechanism in OpenGL. ... > extension is available, then you need to obtain the function pointer ... For me it has nothing to do with daunting, it is a messy spot in the API. ... Just as there are toolkits which abstract GDI, and DirectX. ...
    (comp.graphics.api.opengl)