using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
-----------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form2 : Form
{
public Form2(string b)
{
不知道你要传什么,有一个方法,你自己看看符合你的要求不.
假如窗体A\窗体B,B中默认的构造函数默认为
public B()
{
InitializeComponent();
}
你改为
public B(string str)
{
InitializeComponent();
B.combox.Text = str;
}
在A中调用
Form B = new Form(A.combox.Text);
b.Show();
这样B的控件显示的值就和A的一样了,我记得是这么写的,你自己试验一下吧。想传别的就按这个意思传。