Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: Using SaveFileDialog with Pop3 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
zcast
Newbie
Newbie
Avatar

Joined: 10 July 2011
Location: United States
Online Status: Offline
Posts: 15
Posted: 10 August 2011 at 5:58am | IP Logged Quote zcast

Trying to use the SaveAll attachments method with a SaveFileDialog, but it always pops up 2 screens, one right after the other. This is my code:

Private Sub SaveAttachments()
        With fs
            .InitialDirectory = My.Settings.SaveAttachmentDir
            .Title = "Save File Attachment"
            .Filter = "All files| *.*"
            .DefaultExt = ".eml"
            .FileName = textBoxAttachments.Text
            .ShowDialog()

            If .ShowDialog = DialogResult.OK Then
               msg.Attachments.SaveAll(My.Settings.SaveAttachmentDir, True)

            End If
        End With

    End Sub
Is there a way to use the SaveAll method with a SFD?
Back to Top View zcast's Profile Search for other posts by zcast
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6064
Posted: 10 August 2011 at 7:06am | IP Logged Quote Igor

You seem to use .ShowDialog twice, maybe that's why two windows pop up? Try something like:

Code:
.FileName = textBoxAttachments.Text

If .ShowDialog() = DialogResult.OK Then
    ....


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
zcast
Newbie
Newbie
Avatar

Joined: 10 July 2011
Location: United States
Online Status: Offline
Posts: 15
Posted: 10 August 2011 at 9:00am | IP Logged Quote zcast

One again Igor, you hit it right on the head, and I folly in my oversight. Thank you.
Back to Top View zcast's Profile Search for other posts by zcast
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide