110,536
社区成员
发帖
与我相关
我的任务
分享
//实现透明
label_U.BackColor = Color.White;
this.TransparencyKey = Color.White;
//移动窗口
private static void labelU_MouseDown(object sender, MouseEventArgs e)
{
FxWinApis.ReleaseCapture();
Control g = sender as Control;
if (g != null)
{
FxWinApis.SendMessage(this.Handle, FxWinApis.WM_SYSCOMMAND, FxWinApis.SC_MOVE + FxWinApis.HTCAPTION, 0);
}
}
//缩放窗口
private void FormShowVoltage_MouseDown(object sender, MouseEventArgs e)
{
this.Capture = false;
Form ff = new Form();
ff.StartPosition = FormStartPosition.Manual;
ff.Size = this.Size;
ff.Location = this.Location;
ff.SizeChanged += new EventHandler(ff_SizeChanged);
ff.LocationChanged += new EventHandler(ff_LocationChanged);
int pos = GetPostionAt(e.Location);
if (pos > 0)
{
SendMessage(ff.Handle, WM_SYSCOMMAND, SC_Size + pos, 0);//发送缩放消息
}
ff.Dispose();
}