C#没有可拖动形式的areo [英] C# No areo in a drag-able form
本文介绍了C#没有可拖动形式的areo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码
This is my code
Point lastClicked;
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
lastClicked = e.Location;
}
private void Form1_MouseUp(object sender, MouseEventArgs e)
{
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastClicked.X;
this.Top += e.Y - lastClicked.Y;
}
}
当我将窗体向上拖动时,areo不能在Windows 7中与from一起使用,并且我希望它在我的可拖动窗体上执行areo,此外,还请您解释一下为什么它不能执行areo的问题?
areo = when i drag the from up to the top of my screen the from maximizes
When I drag my form up the areo doesn''t work in windows 7 with the from, and i would like it to do the areo on my drag-able form, plus can some please explain why it doesn''t do the areo?
areo = when i drag the from up to the top of my screen the from maximizes
推荐答案
我认为此链接将为实现Aero提供详细信息:
http://stackoverflow.com/questions/5493149/how-do-i-make-a-wpf-window-movable-by-dragging-the-extended-glass-frame/5773515#5773515 [
I think this link will give enouth to implement Aero:
http://stackoverflow.com/questions/5493149/how-do-i-make-a-wpf-window-movable-by-dragging-the-extended-glass-frame/5773515#5773515[^]
它不起作用,因为图像被拖动为实体位图.您可以使用该位图的不透明度来模拟Auro效果.
It does not work because image is being dragged as solid bitmap. You may play with opacity of that bitmap to simulate Auro effect.
这篇关于C#没有可拖动形式的areo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文