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

📄 frmpiao.cs

📁 功能比较强大的短信收发系统功能比较强大。
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace ShInfo
{
	/// <summary>
	/// frmPiao 的摘要说明。
	/// </summary>
	public class frmPiao : System.Windows.Forms.Form
	{
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Timer timer1;
		private System.Windows.Forms.Timer timer2;
		private AxWMPLib.AxWindowsMediaPlayer axWindowsMediaPlayer1;
		private Sunisoft.IrisSkin.SkinEngine skinEngine1;
		public frmPiao()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.skinEngine1.SkinFile = "MP10.ssk";
			//
			// TODO: 在 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 InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmPiao));
			this.skinEngine1 = new Sunisoft.IrisSkin.SkinEngine(((System.ComponentModel.Component)(this)));
			this.label1 = new System.Windows.Forms.Label();
			this.timer1 = new System.Windows.Forms.Timer(this.components);
			this.timer2 = new System.Windows.Forms.Timer(this.components);
			this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer();
			((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).BeginInit();
			this.SuspendLayout();
			// 
			// skinEngine1
			// 
			this.skinEngine1.SerialNumber = "";
			this.skinEngine1.SkinFile = null;
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.WhiteSmoke;
			this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
			this.label1.Location = new System.Drawing.Point(120, 88);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(176, 32);
			this.label1.TabIndex = 0;
			this.label1.Text = "你有新的短信,请注意查收!";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// timer1
			// 
			this.timer1.Enabled = true;
			this.timer1.Interval = 5;
			this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
			// 
			// timer2
			// 
			this.timer2.Interval = 5;
			this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
			// 
			// axWindowsMediaPlayer1
			// 
			this.axWindowsMediaPlayer1.Enabled = true;
			this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(184, 16);
			this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1";
			this.axWindowsMediaPlayer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
			this.axWindowsMediaPlayer1.TabIndex = 1;
			this.axWindowsMediaPlayer1.Visible = false;
			// 
			// frmPiao
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(322, 136);
			this.Controls.Add(this.axWindowsMediaPlayer1);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			this.Name = "frmPiao";
			this.Text = "消息";
			this.Click += new System.EventHandler(this.frmPiao_Click);
			this.Load += new System.EventHandler(this.frmPiao_Load);
			((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void frmPiao_Load(object sender, System.EventArgs e)
		{
			axWindowsMediaPlayer1.URL="经典短信.mp3";
			axWindowsMediaPlayer1.Ctlcontrols.play();
			axWindowsMediaPlayer1.settings.volume=90;
			axWindowsMediaPlayer1.settings.playCount=1;
			Point p=new Point(958,1024);
			this.DesktopLocation=p;
		}

		private void timer1_Tick(object sender, System.EventArgs e)
		{
			Point p=new Point(this.DesktopLocation.X,this.DesktopLocation.Y-1);
			this.DesktopLocation=p;
			if(p.Y==860)
			{
				timer1.Enabled = false ; 
			}
		}

		private void frmPiao_Click(object sender, System.EventArgs e)
		{
			timer2.Enabled = true ;
			if(MessageBox.Show("要读新短信吗","提示:",MessageBoxButtons.YesNo,MessageBoxIcon.Question)==DialogResult.Yes)
			{
				weiduduanxin ww=new weiduduanxin();
				ww.Show();
			}
			else
			{
				return;
			}
		}

		private void timer2_Tick(object sender, System.EventArgs e)
		{
			Point p = new Point ( this.DesktopLocation.X , this.DesktopLocation.Y+1 ) ;
			this.DesktopLocation = p ;
			if(p.Y==1024)
			{
				this.timer2.Stop();
				this.Close();
			}
		}
	}
}

⌨️ 快捷键说明

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