Home
Manage Your Code
Snippet: passing values from window to another window (C#)
Title: passing values from window to another window Language: C#
Description: passing values from window to another window Views: 140
Author: Raghu k Date Added: 4/3/2008
Copy Code  
1in first window buttonclick
2=============================
3 string fileinfo="c:\\test.txt";
4 WinViewImage winimage = new WinViewImage(fileInfo);
5 winimage.Show();
6
7in second window
8=================
9
10        public WinViewImage(string imgpath)//Pass String

11        {
12            InitializeComponent();
13            strimgpath1 = imgpath;
14        }
15
16       public string strimgpath1;
17
18        private void WinViewImage_Load(object sender, EventArgs e)
19        {
20           textbox1.Text= strimgpath1;      
21
22        }
23  }