我想实现类似于QQ提示新闻的小窗口在右下角托盘处显示出来,我自己做了一个窗体,但是有谁知道怎么在程序中移动窗体的位置吗?可不可以让窗体在指定的地方显示呢?

解决方案 »

  1.   

    如果只是想实现这个托盘的功能 是有控件的 notifyicon之类
      

  2.   

    已经用了,但是要出提示框,里面要显示HTML的东西
      

  3.   

    利用Visual C#实现任务栏通知窗口 http://tech.sina.com.cn/s/2006-08-30/09021110614.shtml
      

  4.   

    这是我做的一个类似QQ消息的窗体,你可以参考下!不知道你要的是不是这样的!
    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;
                }
            }
        }
    }