private void load_file_Click(object sender, EventArgs e) { Main_form mf = new Main_form(); openFileDialog1.InitialDirectory = @"C:\Users\dwiad\Desktop\Visual 2015\Rejest licznika V2\Rejest licznika V2\bin\Debug"; openFileDialog1.Filter = "Pliki tekstowe(txt)|*.txt"; if (openFileDialog1.ShowDialog() == DialogResult.OK) { openedfile = openFileDialog1.SafeFileName; toolStripStatusLabel1.Text = "Wczytany plik: " + openedfile; } }