我想实现类似于QQ提示新闻的小窗口在右下角托盘处显示出来,我自己做了一个窗体,但是有谁知道怎么在程序中移动窗体的位置吗?可不可以让窗体在指定的地方显示呢?
解决方案 »
- C#语音,利用webbrowser控件做浏览器
- “HatchStyle hs = (HatchStyle)(5 + i)”是什么意思啊?
- 请教大侠,这是为啥,C#入门
- 关于 listview.lselecteditems 的返回 类型
- 求操作 xml文件的一点代码
- .NET中用C#语言实现http参数传递的问题,及相关接口的实现
- 如何从DATAGRID中取值
- 想找一个winform 的源程序看看.(最好是OA) 请问谁可以提供?
- 各位老大给个思路啊。急啊!!
- displaymember与valuemember如何使用?
- 如何用子窗口做登陆界面,一子窗口调用另一子窗口???
- 如何把html代码转换word文件,用C#语言。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace MoveWindow
{
public partial class frmMessage : Form
{
Point pt = new Point(); public frmMessage()
{
InitializeComponent();
} private void frmMessage_Load(object sender, EventArgs e)
{
pt.X = Screen.PrimaryScreen.Bounds.X + Screen.PrimaryScreen.Bounds.Width-this.Width;
pt.Y = Screen.PrimaryScreen.Bounds.Y + Screen.PrimaryScreen.Bounds.Height;
this.Location = pt;
timer1.Start();
} private void timer1_Tick(object sender, EventArgs e)
{
if (Location.Y > Screen.FromControl(this).WorkingArea.Height - this.Height)
{
pt.Y -= 2;
Location = pt;
}
else
{
return;
}
}
}
}