C#2003版设两窗体,在一窗体中点替换,弹出替换窗体并实现!

来源:百度知道 编辑:UC知道 时间:2024/05/14 08:33:36
不好意思呀,刚才问题说得不过精确!
窗体一可以输入文体,点击窗体一中的按钮,弹出窗体二(替换对话口,如WORD里的替换),并实现替换功能

花了点时间写了两个窗体

窗体1代码,取名为test1:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace AppTest
{
public class test1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;

private System.ComponentModel.Container components = null;

public test1()
{
InitializeComponent();
}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeCom