CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    in your pocket
    Posts
    339

    [RESOLVED] Save File advise needed

    Hai,

    i have a jpg image in my app.path
    now i have a button in my form. when the user click that button,
    i should be able to allow the user to save this image to anyware on the hardrive with any name.

    i am using a commondilog control for this. setuped the filter and file path.
    but dont no then how to copy my image to user selected location.

    pls help.
    "Don't Bring A Knife To A Gun Fight"

  2. #2
    Join Date
    Aug 2005
    Location
    Imperial College London, England
    Posts
    490

    Re: Save File advise needed

    There are probably simpler ways, but I generally use the FileSystemObject in the Microsoft Scripting Runtime Library.
    There's plenty of stuff on the forums about that.
    Help from me is always guaranteed!*
    VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
    Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.

    *Guarantee may not be honoured.

  3. #3
    Join Date
    Jul 2007
    Location
    in your pocket
    Posts
    339

    Re: Save File advise needed

    javajawa,
    i just feel using a common dialog would be really easy for me.
    is it posible to catch the user saved location in the common dlg after he hit save?
    so i can just copy the file form my app path to his selected location.
    "Don't Bring A Knife To A Gun Fight"

  4. #4
    Join Date
    Aug 2005
    Location
    Imperial College London, England
    Posts
    490

    Re: Save File advise needed

    Oh, that's simple enough. The location the user chooses is put into the filename property of the commondialog control.
    Help from me is always guaranteed!*
    VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
    Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.

    *Guarantee may not be honoured.

  5. #5
    Join Date
    Jul 2007
    Location
    in your pocket
    Posts
    339

    Re: Save File advise needed

    Oh banghead. got it
    "Don't Bring A Knife To A Gun Fight"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured