Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Form1.cs
Package: MDI.rar [view]
Upload User: len11608
Upload Date: 2022-06-26
Package Size: 21k
Code Size: 2k
Category:
Editor
Development Platform:
C#
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- namespace abc
- {
- public partial class MdiFather : Form
- {
- private int numberoftext = 2;
- public MdiFather()
- {
- InitializeComponent();
- MdiChild child = new MdiChild(this,"新建文档");
- child.Show();
- }
- private void MenuNew_Click(object sender, EventArgs e)
- {
- string caption;
- caption = "新建文档" + numberoftext++;
- MdiChild child = new MdiChild(this, caption);
- child.Show();
- }
- private void MenuAbout_Click(object sender, EventArgs e)
- {
- About newf = new About();
- newf.Text = "关于对话框";
- newf.ShowDialog();
- }
- private void MenuExit_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void MenuOpen_Click(object sender, EventArgs e)
- {
- OpenFileDialog opdlg = new OpenFileDialog();
- DialogResult dlgResult;
- dlgResult = opdlg.ShowDialog();
- try
- {
- if (dlgResult == DialogResult.OK)
- {
- string name = opdlg.FileName;
- MdiChild child = new MdiChild(this, name);
- child.rtbText.LoadFile(name, RichTextBoxStreamType.RichText);
- child.Show();
- child.Textchanged = false;
- }
- }
- catch (Exception)
- {
- MessageBox.Show("错误", "格式错误", MessageBoxButtons.OK);
- }
- }
- }
- }