?? form1.cs
字號(hào):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Collections;
namespace WindowsApplication4
{
public partial class Form1 : Form
{
System.Drawing.Bitmap b;
Bitmap T;
byte[] t;
byte[] s;
System.Threading.Thread show;
public Form1()
{
InitializeComponent();
Point p = new Point(500, 1024);
this.Location = p;
t = new byte[4];
t[0] = 5;
}
//窗體移動(dòng)的
//private const int WM_NCHITTEST = 0x84;
//private const int HTCLIENT = 0x1;
//private const int HTCAPTION = 0x2;
//protected override void WndProc(ref Message m)
//{
// switch (m.Msg)
// {
// case WM_NCHITTEST:
// base.WndProc(ref m);
// if ((int)m.Result == HTCLIENT)
// m.Result = (IntPtr)HTCAPTION;
// return;
// }
// base.WndProc(ref m);
//}
private void axSvDTK1_DisConnected(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(t[0].ToString());
}
private void Form1_Load(object sender, EventArgs e)
{
show = new System.Threading.Thread(ShowForm);
show.IsBackground = true;
show.Start();
Rectangle E= Screen.PrimaryScreen.Bounds;
Point p = new Point(Screen.PrimaryScreen.WorkingArea.Width- 260, Screen.PrimaryScreen.WorkingArea.Height - 160);
this.Location = p;
}
private void ShowForm()
{
double t = 0.1;
while (true)
{
if (this.InvokeRequired)
{
SetForm d = delegate(double value)
{
this.Opacity = value;
};
this.Invoke(d, new object[1] { t });
}
else
{
this.Opacity = t;
}
t += 0.1;
System.Threading.Thread.Sleep(150);
if (this.Opacity == 1.0)
{
break;
}
}
}
delegate void SetForm(double value);
private void pictureBox1_Click(object sender, EventArgs e)
{
this.Close();
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
}
private void pictureBox1_MouseLeave(object sender, EventArgs e)
{
this.Cursor = Cursors.Arrow;
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
//int i = e.X; 164 49
if (e.X == 164 && e.Y == 49)
{
toolTip1.Show("sss", this, 164, 49);
}
}
private void Form1_Click(object sender, EventArgs e)
{
toolTip1.Show("sss", this, 164, 49);
}
private void notifyIcon1_Click(object sender, EventArgs e)
{
contextMenuStrip1.Show(new Control(), 50, 50);
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -