Click here to Skip to main content
15,616,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string n;
      byte[] b1;
      OpenFileDialog op;

      private void btnBrowse_Click(object sender, EventArgs e)
            op = new OpenFileDialog();
          if (op.ShowDialog() == DialogResult.OK)
              string t = textBox1.Text;
              t = op.FileName;
              FileInfo fi = new FileInfo(textBox1.Text = op.FileName);
              n = fi.Name + "." + fi.Length;
              TcpClient client = new TcpClient("DELL", 5055);
              StreamWriter sw = new StreamWriter(client.GetStream());
              label1.Text = "File Transferred....";


      private void btnSend_Click(object sender, EventArgs e)
          TcpClient client = new TcpClient("DELL", 5050);
          Stream s = client.GetStream();
          b1 = File.ReadAllBytes(op.FileName);
          s.Write(b1, 0, b1.Length);
          label1.Text = "File Transferred....";
Sascha Lefèvre 22-May-15 6:35am    
Not enough information to help you. What does this mean - "Unable Open Browse Button after running the windows application" ? Does it work once or not at all? Do you get an error?
Srikanth59 22-May-15 7:09am    
Hi After running the application it wont open the Browse(button) to open file dialog options in windows applications
Sascha Lefèvre 22-May-15 7:11am    
Do you mean that nothing happens when you click the button?
Srikanth59 23-May-15 3:39am    
yes nothing happens when i clicked the browse button
ConnectingKamlesh 22-May-15 7:28am    
well, it does open the windows explorer to browse, please make sure your button "btnBrowse" is correctly hooked to the event "btnBrowse_Click".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900