Results 1 to 25 of 25

Thread: Change Hard Code To Selected Pach From Folder Browsing Dialog and problem listbox2

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2021
    Posts
    91

    Change Hard Code To Selected Pach From Folder Browsing Dialog and problem listbox2

    Dear all master,

    please help I want to change the hard code to the selected path from the browsing dialog folder (I marked yellow in the code below)

    and the problem listbox2 is not showing the patch directory. I attached a picture of the problem listbox2.

    thanks
    roy88
    Code:
    Public Class Form1
        Private FullFilePathName As String = ""
        Dim w As Watermarker = New Watermarker("demo", "demo")
        Dim twm As TextWatermark = New TextWatermark
    Private Sub save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save.Click
            Using dlg As FolderBrowserDialog = New FolderBrowserDialog()
    
                Dim dr As DialogResult = dlg.ShowDialog(Me)
                If dr = DialogResult.OK Then
                    ListBox2.Items.Clear()
                    For Each file As String In dlg.SelectedPath
                        If String.IsNullOrEmpty(FullFilePathName) Then FullFilePathName = System.IO.Path.GetDirectoryName(file)
                        twm.Text = "Copyright � John Doe, 2008"
                        twm.Font = New WatermarkFont("Arial", FontStyle.Bold, FontSizeType.Percents, 2)
                        twm.TextColor = Color.Red
                        twm.Transparency = 40
                        twm.Alignment = TextAlignment.Center
                        twm.Placement = WatermarkPlacement.BottomRight
                        twm.Margins = New WatermarkMargins(20, 20, 20, 20)
                        w.AddWatermark(twm)
                        w.OutputOptions.OutputDirectory = "c:\emp\output"
                        w.Execute()
                        ListBox2.Items.Add(file)
                    Next
                End If
            End Using
        End Sub
    End Class
    Attached Images Attached Images  

Tags for this Thread

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