Form1.cs

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

namespace MoreWindows
{

/// <summary>
/// Zusammenfassung für Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{

private System.Windows.Forms.Button btn_continue;
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Erforderlich für die Windows Form-Designerunterstützung
//
InitializeComponent();

//
// TODO: Fügen Sie den Konstruktorcode nach dem Aufruf von InitializeComponent hinzu
//
}

/// <summary>
/// Die verwendeten Ressourcen bereinigen.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.btn_continue = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btn_continue
//
this.btn_continue.Location = new System.Drawing.Point(88, 24);
this.btn_continue.Name = "btn_continue";
this.btn_continue.Size = new System.Drawing.Size(112, 24);
this.btn_continue.TabIndex = 0;
this.btn_continue.Text = "weiter >>";
this.btn_continue.Click += new System.EventHandler(this.btn_continue_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 70);
this.Controls.Add(this.btn_continue);
this.Name = "Form1";
this.Text = "erstes Fenster";
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void btn_continue_Click(object sender, System.EventArgs e)
{
Form frm2 = new Form2();
frm2.Show/*Dialog*/();
}
}
}

Form2.cs

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

namespace MoreWindows
{
/// <summary>
/// Zusammenfassung für Form2.
/// </summary>
public class Form2 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btn_back;
private System.Windows.Forms.Button btn_quit;
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form2()
{
//
// Erforderlich für die Windows Form-Designerunterstützung
//
InitializeComponent();

//
// TODO: Fügen Sie den Konstruktorcode nach dem Aufruf von InitializeComponent hinzu
//
}

/// <summary>
/// Die verwendeten Ressourcen bereinigen.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.btn_back = new System.Windows.Forms.Button();
this.btn_quit = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btn_back
//
this.btn_back.Location = new System.Drawing.Point(96, 40);
this.btn_back.Name = "btn_back";
this.btn_back.Size = new System.Drawing.Size(96, 32);
this.btn_back.TabIndex = 0;
this.btn_back.Text = "&zurück";
this.btn_back.Click += new System.EventHandler(this.btn_back_Click);
//
// btn_quit
//
this.btn_quit.Location = new System.Drawing.Point(96, 104);
this.btn_quit.Name = "btn_quit";
this.btn_quit.Size = new System.Drawing.Size(96, 32);
this.btn_quit.TabIndex = 1;
this.btn_quit.Text = "&Beenden";
this.btn_quit.Click += new System.EventHandler(this.btn_quit_Click);
//
// Form2
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 174);
this.Controls.Add(this.btn_quit);
this.Controls.Add(this.btn_back);
this.Name = "Form2";
this.Text = "zweites Fenster";
this.ResumeLayout(false);

}
#endregion

private void btn_quit_Click(object sender, System.EventArgs e)
{
Application.Exit();
}

private void btn_back_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}

<<zurück>>