+ -
当前位置:首页 → 问答吧 → taskbarNotifier.cs在c#的aspx.net页面怎么用?

taskbarNotifier.cs在c#的aspx.net页面怎么用?

时间:2011-06-26

来源:互联网

 

请教各位大侠:

我看到下面介绍的taskbarNotifier.cs在winfom中的成功应用,我想在WEB网站的aspx中应用,怎么应用呢?

http://www.codeproject.com/KB/miscctrl/taskbarnotifier.aspx


我在ASPX页面中尝试:
JScript code
protected void Button1_Click(object sender, EventArgs e)
    {
            TaskbarNotifier taskbarNotifier1 = new TaskbarNotifier();
        //taskbarNotifier1.SetBackgroundBitmap(new Bitmap(GetType(), "skin.bmp"), Color.FromArgb(255, 0, 255));
        //taskbarNotifier1.SetCloseBitmap(new Bitmap(GetType(), "close.bmp"), Color.FromArgb(255, 0, 255), new Point(127, 8));

        taskbarNotifier1.SetBackgroundBitmap(Resources.Resource.skin, Color.FromArgb(255, 0, 255));
        taskbarNotifier1.SetCloseBitmap(Resources.Resource.close, Color.FromArgb(255, 0, 255), new Point(127, 8));
        taskbarNotifier1.TitleRectangle = new Rectangle(40, 9, 70, 25);
        taskbarNotifier1.ContentRectangle = new Rectangle(8, 41, 133, 68);
        taskbarNotifier1.TitleClick += new EventHandler(TitleClick);
        taskbarNotifier1.ContentClick += new EventHandler(ContentClick);
        taskbarNotifier1.CloseClick += new EventHandler(CloseClick);

        taskbarNotifier1.CloseClickable = true;
        taskbarNotifier1.TitleClickable = true;
        taskbarNotifier1.ContentClickable = true;
        taskbarNotifier1.EnableSelectionRectangle = true;
        taskbarNotifier1.KeepVisibleOnMousOver = true;    // Added Rev 002
        taskbarNotifier1.ReShowOnMouseOver = true;            // Added Rev 002
        taskbarNotifier1.Show("Titl", "Content", 500, 3000,500);
 }

    void CloseClick(object obj, EventArgs ea)
    {
        MessageBox.Show("Closed was Clicked");
    }

    void TitleClick(object obj, EventArgs ea)
    {
        MessageBox.Show("Title was Clicked");
    }

    void ContentClick(object obj, EventArgs ea)
    {
        MessageBox.Show("Content was Clicked");
    }


没有任何反应。
 

希望给我提供帮助,万分感激!



礼!

 

 

作者: enetian   发布时间: 2011-06-26

浮动层的效果而已,你的那个代码是windowform的,web无法应用

作者: showbo   发布时间: 2011-06-26

WEB的ASPX程序怎么实现同样的效果呢?
通过C#后台服务端程序来触发图片窗口显示。
谢谢!

作者: enetian   发布时间: 2011-06-26