Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:45:04+00:00 2026-05-25T09:45:04+00:00

In my program I implemented proxy support. I set up an if/then statement with

  • 0

In my program I implemented proxy support.

I set up an if/then statement with a checkbox so basically it says if the checkbox is checked activate the proxy and use the proxies that the user uploaded into a list box.

I also have some streamreaders set up in my code which imports the text of a textfile in a text box. When I try to do proxies and try to import the text file it gives me some error saying the file could not be found but when I dont check the check box to use the proxy it imports it just fine.

This is the code for the checkbox:

if (chkBoxProxy.Checked)
{
    if (listBox1.SelectedIndex < listBox1.Items.Count - 1)
    {
        listBox1.SelectedIndex = listBox1.SelectedIndex + 1;
        listBox1.SetSelected(listBox1.SelectedIndex, true);
        RefreshIESettings(listBox1.SelectedItem.ToString());

        for (int i = 0; i < numericUpDown2.Value; i++)
        {
            listBox4.SetSelected(i, true);
            listBox4.SelectedItem.ToString();

           account();
        }
    }
}
else
{
    for (int i = 0; i < numericUpDown2.Value; i++)
    {
        listBox4.SetSelected(i, true);
        listBox4.SelectedItem.ToString();

        account();
    }
}

And this is the code for one of the several stream readers that I have:

StreamReader stream1 = new StreamReader("website.txt");
string stream2 = stream1.ReadToEnd();
txtBoxImportWebsite.Text = stream2;

stream1.Close();
stream1.Dispose();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:45:04+00:00Added an answer on May 25, 2026 at 9:45 am

    boy your code is not complete enough, we should see exactly all the places where you call your stream management from. From where/what is the file website.txt created? why are you not specifying a full path when you open it?

    as a general rule you should wrap your Streams with using so close and dispose is called automatically when using block ends and also in case of exceptions, you could rewrite your last fragment in this way:

    using (var stream1 = new StreamReader("website.txt"))
    {
      txtBoxImportWebsite.Text = stream1.ReadToEnd();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found an interesting bug in a program that I implemented somewhat lazily, and
I have a program that is been implemented in C++ which I now want
Background I have a program that has implemented the two classic taxes for Ontario
I implemented a client-server program that allows to transfer files b/w them. The server
I have implemented a UIActivityIndicator that shows up in one part of my program
I have written a program that relies on a proxy to function. I now
I have implemented lazy loading in my program. it's done through a proxy class
Im trying to do a Corba program implemented with java that is at the
I have implemented an android program that can receive simple messages using the MJSIP,
I'm trying to write a program that uses fattach but the compiler says fattach

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.