using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AOPDemo
{
public partial class AppIconMsg : Form
{
public AppIconMsg()
{
InitializeComponent();
//设置背景为透明
this.BackColor = Color.FromArgb(116, 164, 2);
this.TransparencyKey = this.BackColor;
}
private void AppIconMsg_Load(object sender, EventArgs e)
{
this.Width = 64;
this.Height = 64;
this.label1.Text = "99";
this.timer1.Enabled = true;
}
// Drag it around the screen
private const int WM_NCHITTEST = 0x84;
private const int HTCAPTION = 0x2;
protected override void WndProc(ref Message m)
{
//Disable mouseDoubleClick on form
if (m.Msg == WM_LBUTTONDBLCLK)
{
Form2 frm = new Form2(msg);
frm.Show();
//this.Close();
return;
}
if (m.Msg == WM_NCLBUTTONDBLCLK)
{
Form2 frm = new Form2(msg);
frm.Show();
// this.Close();
return;
}
//drag
if (m.Msg == WM_NCHITTEST)
m.Result = new IntPtr(HTCAPTION);
else
base.WndProc(ref m);
}
private int msg = 0;
private void timer1_Tick(object sender, EventArgs e)
{
int num = new Random().Next(1, 100);
msg = num;
this.label1.Text = num.ToString();
}
const int WM_LBUTTONDBLCLK = 0x0203;//client area
const int WM_NCLBUTTONDBLCLK = 0x00A3;//non-client area
private void toolStripExit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有