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




Reply With Quote
