net_liu 发表于 2013-1-24 21:02:12

模拟万象管理提示

模拟万象管理提示:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Clsmn {public partial class Form1 : Form {public Form1(string msg) {InitializeComponent();this.ShowMsg = msg;}public Form1() {InitializeComponent();}private string ShowMsg;private Point Work = new Point(SystemInformation.WorkingArea.Width - 275, SystemInformation.WorkingArea.Height);private void lblClose_Click(object sender, EventArgs e) {this.Close();}int time = 0;private void timer1_Tick(object sender, EventArgs e) {if(Work.Y < SystemInformation.WorkingArea.Height - this.Height) {time++;if(time > 300) {timer1.Stop();timer2.Start();}}else {this.Location = Work;Work = new Point(Work.X, Work.Y -= 6);this.Activate();}}private void timer2_Tick(object sender, EventArgs e) {this.Location = Work;Work = new Point(Work.X, Work.Y += 6);if(Work.Y > SystemInformation.WorkingArea.Height)Application.Exit();}private void Form1_Load(object sender, EventArgs e) {if(!string.IsNullOrEmpty(ShowMsg))this.lblMsg.Text = ShowMsg;}}} 
页: [1]
查看完整版本: 模拟万象管理提示