Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Send a string from one form to another forn

Send a string from one form to another forn

Scheduled Pinned Locked Moved C#
algorithmshelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shaahinm
    wrote on last edited by
    #1

    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

    Z 1 Reply Last reply
    0
    • S Shaahinm

      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

      Z Offline
      Z Offline
      ZenyukIV
      wrote on last edited by
      #2

      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; } } }

      S 1 Reply Last reply
      0
      • Z ZenyukIV

        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; } } }

        S Offline
        S Offline
        Shaahinm
        wrote on last edited by
        #3

        Really thanks ,really helpful thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups