⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 opennetcf2.0实作,详细说明请参数文件内说明
💻 CS
字号:
//==========================================================================================
//
//		OpenNETCF.Samples.ApplicationExCSharp.Form1
//		Copyright (c) 2003, OpenNETCF.org
//
//		This library is free software; you can redistribute it and/or modify it under 
//		the terms of the OpenNETCF.org Shared Source License.
//
//		This library is distributed in the hope that it will be useful, but 
//		WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
//		FITNESS FOR A PARTICULAR PURPOSE. See the OpenNETCF.org Shared Source License 
//		for more details.
//
//		You should have received a copy of the OpenNETCF.org Shared Source License 
//		along with this library; if not, email licensing@opennetcf.org to request a copy.
//
//		If you wish to contact the OpenNETCF Advisory Board to discuss licensing, please 
//		email licensing@opennetcf.org.
//
//		For general enquiries, email enquiries@opennetcf.org or visit our website at:
//		http://www.opennetcf.org
//
//==========================================================================================
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using OpenNETCF.Windows.Forms;

namespace OpenNETCF.Samples.ApplicationExCSharp
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.MainMenu mainMenu1;
		private MouseFilter mouseFilter = new MouseFilter();
		private System.Windows.Forms.TextBox textBox1;
		private KeyFilter keyFilter = new KeyFilter();

		public Form1()
		{
			InitializeComponent();

			// these show how to get the WM_xxxx string for a windows message
//			MessageBox.Show(WinMsg.WM_LBUTTONDBLCLK.ToString());
//			MessageBox.Show(((WinMsg)1).ToString());

			// hook up some filters
			ApplicationEx.AddMessageFilter(mouseFilter);
			ApplicationEx.AddMessageFilter(keyFilter);

			// hook up the threadexit event
			ApplicationEx.ThreadExit += new EventHandler(ApplicationEx_ThreadExit);
		}
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			base.Dispose( disposing );
		}
		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.mainMenu1 = new System.Windows.Forms.MainMenu();
			this.textBox1 = new System.Windows.Forms.TextBox();
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(48, 52);
			this.textBox1.Size = new System.Drawing.Size(128, 22);
			this.textBox1.Text = "";
			// 
			// Form1
			// 
			this.Controls.Add(this.textBox1);
			this.MaximizeBox = false;
			this.Menu = this.mainMenu1;
			this.MinimizeBox = false;
			this.Text = "Form1";
			this.Closed += new System.EventHandler(this.Form1_Closed);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>

		static void Main() 
		{
			ApplicationEx.Run(new Form1());
		}

		private void Form1_Closed(object sender, System.EventArgs e)
		{
			ApplicationEx.Exit();
		}

		private void ApplicationEx_ThreadExit(object sender, EventArgs e)
		{
			MessageBox.Show("Exiting App Thread!");
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -