求教:win form窗口悬浮! 这个是你想要的http://www.codeproject.com/cs/miscctrl/taskbarnotifier.asp?target=TaskbarNotifier 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上的是象msn那样,任务栏弹出。我象要的是象qq窗体那样,窗体能在屏幕边缩进去! 这个问题很早前在bcb版解决了。你可以去bcb版搜索一下进行参考。 在ftp://qydn.vicp.net上,有一个文件叫myoutlookbar.rar,虽然讲的是outlookbar界面,但你说的方法原理完全一样,建议参考。也就是通过一个计时器判断当前鼠标位置,如果位于窗口外面,则设置窗口宽带为1,达到隐藏的目的,当然鼠标在窗口上移动时,则显示完整的窗口。 这里有代码:private void Form1_MouseLeave(object sender, System.EventArgs e) { const int j = 5; // 要故意露出在右上的高度 if (this.Top <1) { //如果当前X 已经是在最顶 // 并且Y 也已经在最右边 if (this.Left >= Screen.PrimaryScreen.WorkingArea.Width - this.Width) { // 开始往上移 while(this.Top >= 0-this.Height + j) { this.Top --; } } } } private void Form1_MouseEnter(object sender, System.EventArgs e) { const int j=5; if (this.Top <0) { // 这里是移回正常位置的代码你接上面的逆着做就是了 if(this.Left<Screen.PrimaryScreen.WorkingArea.Width - this.Width) while(this.Top>=this.Height-j) { this.Top ++; } } } to lxhvc(lanhai):程序没有反应! 为什么不在LocationChanged事件编码来判断当前位置呢?? 请教,ListBox中有没有一个可以侦测到Items.count发生变化后的引发事件 生成一组随机数,确都是重复的数字 平台调用,出现 System.AccessViolationException C#读大文件问题 请教一个关于Dock的也许很简单的问题(Winform) 求继承System.Windows.Forms.ToolBar的ToolBar自定义控件或者用户控件 删除记录问题 会Remoting并了解天网防火墙的进来 ClickOnce部署安装路径的问题? DataGrid 中数据绑定 如何向数据库批量插入数据 listView如何获取SelectedItem的text阿?
我象要的是象qq窗体那样,窗体能在屏幕边缩进去!
{
const int j = 5; // 要故意露出在右上的高度 if (this.Top <1)
{ //如果当前X 已经是在最顶
// 并且Y 也已经在最右边
if (this.Left >= Screen.PrimaryScreen.WorkingArea.Width - this.Width)
{
// 开始往上移
while(this.Top >= 0-this.Height + j)
{
this.Top --;
}
}
}
} private void Form1_MouseEnter(object sender, System.EventArgs e)
{
const int j=5;
if (this.Top <0)
{
// 这里是移回正常位置的代码你接上面的逆着做就是了
if(this.Left<Screen.PrimaryScreen.WorkingArea.Width - this.Width)
while(this.Top>=this.Height-j)
{
this.Top ++;
}
}
}
程序没有反应!