Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Uploading Progress Bar

Uploading Progress Bar

Scheduled Pinned Locked Moved Visual Basic
comsysadminquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cwayman
    wrote on last edited by
    #1

    Hey i have been trying to use this[^] code project article. I want to use this article to show the progress of my uploading process. Unfortunatley i am unable to get the progress bar to increase as i am using a separate class to upload my files which implements from an interface and i am having trouble incrementing the counter i which i have declared globally. my code is below from using this article Private Sub btnPublish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPublish.Click Dim Progress As New ProgressWindow Progress.Text = "Work" System.Threading.ThreadPool.QueueUserWorkItem(New System.Threading.WaitCallback(AddressOf PublishingFiles), Progress) Progress.ShowDialog() End Sub Private Sub PublishingFiles(ByVal status As Object) Dim callback As ProgressCallback = CType(status, ProgressCallback) Try callback.Begin(0, 100) Dim i As Integer = 0 While i < 100 callback.SetText(String.Format("Performing op: {0}", i)) callback.StepTo(i) If callback.IsAborting Then Return End If ''''''''''''''MY CODE''''''''''''''' strPublisher = tbPublisher.Text strDateTime = tbDateTime.Text If cmboSelection.Text = "Network Location" Then Dim SMB As New SMBRepository With SMB strIntialFolder = strPathSMB + "\" + SMB.AddXMLDeclaration().attributes(0).text + "\" .CreateDirectory(strIntialFolder) .CreateFolderStructure(SMB.AddXMLDeclaration(), strIntialFolder, objRepository) .TransferDocumentIndex() End With ElseIf cmboSelection.Text = "FTP Transfer" Then Dim FTP As New FTPRepository With FTP strIntialFolder = FTP.AddXMLDeclaration().attributes(0).text .Connect() .CreateFolderStructure(FTP.AddXMLDeclaration(), strIntialFolder, objRep

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups