多文档应用程序
本章将详细介绍如何开发多文档应用程序。多文档应用程序一般指该程序包含了多个文档类型。本
章主要涉及的内容包括:如何利用MFC 创建多文档应用程序;窗口的拆分如何实现;多文档应用程序
中的文件读写,最后给出一个最简单的例子。本章知识点包括:
C#学生选课系统
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()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
string n = Form1.name;
textBox1.Text= n ; //将登录用户调入以显示某某用户进入本系统
textBox1.ReadOnly = true; //该 textBox1为只读
textBox2.Text = "朱振华"; //将制作者即本人留名
textBox2.ReadOnly = true; //该 textBox2为只读
}
private void 退出登录ToolStripMenuItem_Click(object sender, EventArgs e)//退出登录返回到登陆界面
{
if (MessageBox.Show("确定退出登录吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK) //再次确定是否要退出系统
{
this.Hide();
Form1 aa = new Form1(); //跳到登录界面
aa.Show();
}
}
private void 个人信息ToolStripMenuItem_Click(object sender, EventArgs e)//跳到个人信息页面,显示个人信息
{
this.Hide();
Form7 aa = new Form7();
aa.Show();
}
private void 选课列表 ToolStripMenuItem_Click(object sender, EventArgs e)//跳到选课列表
{
this.Hide();
Form9 aa = new Form9();
aa.Show();
}
private void 选课要求ToolStripMenuItem_Click(object sender, EventArgs e)//调到选课要求
{
this.Hide();
Form8 aa = new Form8();
aa.Show();
}
private void 本次选课结果ToolStripMenuItem_Click(object sender, EventArgs e)//调到本次选课结果
{
this.Hide();
Form10 aa = new Form10();
aa.Show();
}