© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
114 replies
mod_yuria

❔ So I've created a downloader, how do I link a progress bar to it? Winform, .NET framework

here's my code (website down rn):
private void button1_Click(object sender, EventArgs e)
        {
            var client = new WebClient();


            try
            {
                client.DownloadFile("http://moonshroud.net/patchingtest.zip", @"patchtest.zip");
                string zipPath = @".\patchtest.zip";
                string extractPath = @".\Wrath of the Lich King";
                ZipFile.ExtractToDirectory(zipPath, extractPath);
                File.Delete(@".\Wrath of the Lich King\Data\enUS\realmlist.wtf");


                client.DownloadFile("http://moonshroud.net/World-of-Warcraft-3.3.5a.12340-enUS%20PATCH.zip", @"patch.zip");
                zipPath = @".\patch.zip";
                extractPath = @".\Wrath of the Lich King";
                ZipFile.ExtractToDirectory(zipPath, extractPath);
                File.Delete(@".\patchtest.zip");
                File.Delete(@".\patch.zip");
            }
            
            catch {}

        }
private void button1_Click(object sender, EventArgs e)
        {
            var client = new WebClient();


            try
            {
                client.DownloadFile("http://moonshroud.net/patchingtest.zip", @"patchtest.zip");
                string zipPath = @".\patchtest.zip";
                string extractPath = @".\Wrath of the Lich King";
                ZipFile.ExtractToDirectory(zipPath, extractPath);
                File.Delete(@".\Wrath of the Lich King\Data\enUS\realmlist.wtf");


                client.DownloadFile("http://moonshroud.net/World-of-Warcraft-3.3.5a.12340-enUS%20PATCH.zip", @"patch.zip");
                zipPath = @".\patch.zip";
                extractPath = @".\Wrath of the Lich King";
                ZipFile.ExtractToDirectory(zipPath, extractPath);
                File.Delete(@".\patchtest.zip");
                File.Delete(@".\patch.zip");
            }
            
            catch {}

        }


if I understand correctly, it doesn't really have a way to keep track of this. It's just not there then suddenly it is. how would I go about linking this to my progress bar?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

❔ How to set progress bar in taskbar in winform?
C#CC# / help
3y ago
❔ Need help adding a progress bar to an rclone downloader
C#CC# / help
3y ago
✅ How to make a "loading" progress bar
C#CC# / help
2y ago
Progress bar problem
C#CC# / help
2y ago