Send a string from one form to another forn
-
hi, I Have one form(frmTicket) which the user got to choose a city from a combobox in it. there is a button next to combo box which opens another from(frmSearchCity) that is searching For cities. the second form(frmSearchCity) has a textbox and a datagridview which on textchange event of the textbox the datagrid updates. what I want to do is that when I double click on one of cells , this form(frmSearchCity) get closed and the value which I clicked, be the selected text(city) of the comboBox in the firstform(frmTicket). please help me :D
-
hi, I Have one form(frmTicket) which the user got to choose a city from a combobox in it. there is a button next to combo box which opens another from(frmSearchCity) that is searching For cities. the second form(frmSearchCity) has a textbox and a datagridview which on textchange event of the textbox the datagrid updates. what I want to do is that when I double click on one of cells , this form(frmSearchCity) get closed and the value which I clicked, be the selected text(city) of the comboBox in the firstform(frmTicket). please help me :D
Create win app, name main form Sender, add another form - Reciever and code:
namespace WindowsApplication1 { public partial class Sender : Form { **Reciever reciever;** public Sender() { InitializeComponent(); reciever = new Reciever(); reciever.Show(); } private void button1_Click( object sender, EventArgs e ) { reciever.Controls["label1"].Text = textBox1.Text; } } }
-
Create win app, name main form Sender, add another form - Reciever and code:
namespace WindowsApplication1 { public partial class Sender : Form { **Reciever reciever;** public Sender() { InitializeComponent(); reciever = new Reciever(); reciever.Show(); } private void button1_Click( object sender, EventArgs e ) { reciever.Controls["label1"].Text = textBox1.Text; } } }