Skip to content

Instantly share code, notes, and snippets.

@cosmez
Created January 21, 2016 03:19
Show Gist options
  • Save cosmez/17b810b67796001f120b to your computer and use it in GitHub Desktop.
Save cosmez/17b810b67796001f120b to your computer and use it in GitHub Desktop.
Form Con Parametro Extra
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ParametroExtra
{
public partial class frmAbrir : Form
{
public frmAbrir()
{
InitializeComponent();
}
private void btnAbrir_Click(object sender, EventArgs e)
{
var form = (Form2)Activator.CreateInstance(typeof(Form2), "Cadena Simple", 2343242);
form.Show();
}
private void frmAbrir_Load(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ParametroExtra
{
public partial class Form2 : Form
{
public string Cadena { get; set; }
public int Entero { get; set; }
public Form2(string cadena, int entero)
{
Cadena = cadena;
Entero = entero;
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
lblCadena.Text = Cadena;
lblEntero.Text = Entero.ToString();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment