如题所述
å
å设æ¡ä»¶ä¸ºï¼çªä½ä¸å称为Form1ï¼å
¶ä¸ææ¬æ¡ä¸ºtext1ï¼çªä½äºå称为Form2ï¼å
¶ä¸ææ¬æ¡ä¸ºtext1.
çªä½ä¸ä¸é¢ç代ç 为ï¼
private Sub Text1_Change() â注æè¿éæ¯change
Form3.Label1.Caption = Form3.Label1.Caption & Text1.Text
end Sub
çªä½äºä¸é¢ç代ç 为ï¼
private Sub Text1_Change()
Form3.Label1.Caption = Form3.Label1.Caption & Text1.Text
end Sub
è¿æ ·å¨çªä½ä¸æè äºçææ¬æ¡ä¸è¾å ¥å 容æ¶ï¼çªä½ä¸ä¸é¢çlabelæ ç¾çå 容ä¹ä¼éä¹ååå¦ã
çªä½ä¸ä¸é¢ç代ç 为ï¼
private Sub Text1_Change() â注æè¿éæ¯change
Form3.Label1.Caption = Form3.Label1.Caption & Text1.Text
end Sub
çªä½äºä¸é¢ç代ç 为ï¼
private Sub Text1_Change()
Form3.Label1.Caption = Form3.Label1.Caption & Text1.Text
end Sub
è¿æ ·å¨çªä½ä¸æè äºçææ¬æ¡ä¸è¾å ¥å 容æ¶ï¼çªä½ä¸ä¸é¢çlabelæ ç¾çå 容ä¹ä¼éä¹ååå¦ã
温馨提示:答案为网友推荐,仅供参考
第1个回答 2017-05-19
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 WindowsFormsApplication5
{
public partial class Form1 : Form
{
string s;
public Form1()
{
InitializeComponent();
}
private void radioButton1_Click(object sender, EventArgs e)
{
s = textBox1.Text;
}
private void radioButton2_Click(object sender, EventArgs e)
{
s = textBox2.Text;
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = s;
}
private void Form1_Load(object sender, EventArgs e)
{
textBox1.MaxLength = 6;
textBox2.PasswordChar = '*';
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
string s;
public Form1()
{
InitializeComponent();
}
private void radioButton1_Click(object sender, EventArgs e)
{
s = textBox1.Text;
}
private void radioButton2_Click(object sender, EventArgs e)
{
s = textBox2.Text;
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = s;
}
private void Form1_Load(object sender, EventArgs e)
{
textBox1.MaxLength = 6;
textBox2.PasswordChar = '*';
}
}
}