• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 124,  comments - 29,  trackbacks - 0

            //注意在工程上添加系統引用System.Drawing 否則System點不出Drawing來。

            using System;
            using System.Collections.Generic;
            using System.ComponentModel;
            using System.Data;
            using System.Drawing;
            using System.Text;
            using System.Windows.Forms;
            using DevComponents.DotNetBar;

            namespace TaskBarFloatWnd
            {
                public partial class Form1 : Office2007Form
                {
                    public Form1()
                    {
                        InitializeComponent();
                       
                    }

                  

                    private void button1_Click(object sender, EventArgs e)
                    {

                        TaskBarWnd taskWnd = new TaskBarWnd();
                        System.Drawing.Rectangle r = System.Windows.Forms.Screen.GetWorkingArea(taskWnd);
                        taskWnd.Location = new System.Drawing.Point(r.Right - taskWnd.Width, r.Bottom - taskWnd.Height);
                        taskWnd.Show();
                    }
                }
            }



            using System;
            using System.Collections.Generic;
            using System.ComponentModel;
            using System.Data;
            using System.Drawing;
            using System.Text;
            using System.Windows.Forms;
            using DevComponents.DotNetBar;

            namespace TaskBarFloatWnd
            {
                
            public partial class TaskBarWnd : Office2007Form
                
            {
                    
            public TaskBarWnd()
                    
            {
                        InitializeComponent();
                        actform 
            = GetActiveWindow();
                    }

                    
            private bool isFristShow = true;//標識是否是首次加載
                    [System.Runtime.InteropServices.DllImport("user32.dll")]
                    
            public static extern IntPtr GetActiveWindow();//獲得當前活動窗體
                    [System.Runtime.InteropServices.DllImport("user32.dll")]
                    
            public static extern IntPtr SetActiveWindow(IntPtr hwnd);//設置活動窗體

                    
            private IntPtr actform = IntPtr.Zero;//保存自己得到焦點前擁有活動窗體的柄
                    private void TaskBarWnd_Load(object sender, EventArgs e)
                    
            {
                        textBox1.Text 
            = DateTime.Now + "——";
                        textBox1.Text 
            = textBox1.Text + "目前正對網元1進行做單操作,10分鐘內請大家避讓";

                    }

                    
            protected override void OnActivated(EventArgs e)
                    
            {
                        
            base.OnActivated(e);
                        
            if (isFristShow == true)
                        
            {
                            SetActiveWindow(actform);
                            isFristShow 
            = false;
                        }

                    }


                   

                    
            private void TaskBarWnd_FormClosing(object sender, FormClosingEventArgs e)
                    
            {
                        
                    }

                }

            }
            posted on 2010-02-26 16:14 天書 閱讀(2877) 評論(1)  編輯 收藏 引用

            FeedBack:
            # re: C# 浮動窗口 屏幕右下角顯示但不獲得焦點 工程上右鍵添加系統引用System.Drawing
            2010-11-13 21:15 | Aita
            您好,請問Office2007Form是個怎樣的form?  回復  更多評論
              

            <2008年12月>
            30123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久久久久毛片免费看| 偷窥少妇久久久久久久久| 久久国产乱子伦精品免费强| 久久精品视频免费| 精品久久久久久久久免费影院| 久久亚洲精品成人av无码网站| 亚洲天堂久久精品| 久久精品成人欧美大片| 97精品久久天干天天天按摩| 国产精品日韩欧美久久综合| 久久亚洲AV成人无码软件| 国产一区二区三区久久精品| 一级做a爰片久久毛片毛片| 国产综合久久久久久鬼色| 日日狠狠久久偷偷色综合0| 婷婷综合久久中文字幕蜜桃三电影 | 奇米影视7777久久精品| 久久免费99精品国产自在现线| 欧美黑人又粗又大久久久 | 久久久久国产日韩精品网站| 亚洲色婷婷综合久久| 久久久久久青草大香综合精品| 国产成人久久精品激情 | 少妇久久久久久被弄到高潮| 久久青青草原国产精品免费| 色婷婷综合久久久久中文一区二区| 性高朝久久久久久久久久| 97久久精品人人澡人人爽| 国产一区二区三区久久精品| 国产成人久久AV免费| 99久久精品国产免看国产一区| 久久99国内精品自在现线| 久久精品国产亚洲AV嫖农村妇女| 一本色道久久88—综合亚洲精品| 国产69精品久久久久APP下载| 性做久久久久久免费观看| 一本一道久久a久久精品综合| 伊人久久亚洲综合影院| 欧美伊人久久大香线蕉综合| 久久AV无码精品人妻糸列| 色欲综合久久躁天天躁蜜桃|