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
V

Vinh Nguyen

@Vinh Nguyen
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • change text from form
    V Vinh Nguyen

    You can simply do following steps to get your code works: - In the definition of each form (Form1.cs and Form2.cs for example), declare a property of type Form and name it as TargetForm or so. - In the main function in program.cs, you initiate the two forms at once, then keep a reference between them, like:

    var form1 = new Form1();
    var form2 = new Form2();
    form1.TargetForm = form2;
    form2.TargetForm = form1;

    then hide one of them if necessary. - Update your event handling function, for example for button1.click in the form1:

    private void button1_Click(object sender, EventArgs e)
    {
    this.TargetForm.Show();
    this.TargetForm.Text = textBoxform1.Text;
    Hide();
    }

    C# help

  • How can I access the properties of this object?
    V Vinh Nguyen

    For public properties, you can access them 'programmatically' as usual. For non-public ones, try to use reflection. There are a lot of articles on the internet telling about it.

    C# question tutorial
  • Login

  • Don't have an account? Register

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