程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> C# >> C#入門知識 >> 關於WinCe托盤做法

關於WinCe托盤做法

編輯:C#入門知識

前段時間做一個 WinCe的小程序,用來檢測ZigBee網絡信號。有顯示系統托盤(NotifyIcon)的需求、

 

開始了。

 

首頁准備一個托盤的類  NotifyIcon.cs 

    
        
           
                
           
                    uID =                   
                       messageWindow =  MyMessageWindow(             messageWindow.uID =                        
                  _Icon = 
         
         ~    
          
                   
          
                        NotifyMessage(messageWindow.Hwnd, NIM_ADD, (           
                   
          
           Add(              IntPtr hIcon = LoadIcon(GetModuleHandle(             NotifyMessage(messageWindow.Hwnd, NIM_ADD, (           
                   
          
                        NotifyMessage(messageWindow.Hwnd, NIM_ADD, (           
                   
                         (_Icon !=                   NotifyMessage(messageWindow.Hwnd, NIM_ADD, (              
             NotifyMessage(messageWindow.Hwnd, NIM_DELETE, (  
            
             NotifyMessage(messageWindow.Hwnd, NIM_MODIFY, ( 
  
 
 
           NotifyMessage(IntPtr hwnd,  dwMessage,               NOTIFYICONDATA notdata =  
             notdata.cbSize =              notdata.hIcon =             notdata.hWnd =             notdata.uCallbackMessage =             notdata.uFlags = NIF_MESSAGE |             notdata.uID = 
              ret = Shell_NotifyIcon(dwMessage,   
          API 
         
           NIF_MESSAGE =            NIF_ICON =             WM_LBUTTONDOWN =  
            NIM_ADD =             NIM_MODIFY =             NIM_DELETE =  
         
            WM_NOTIFY_TRAY =  +  
         
 
 
                                                                                               
         [DllImport(                          dwMessage,  
         [DllImport(             
         [DllImport(                           
         [DllImport(            
         [DllImport(            IntPtr LoadIcon(IntPtr hInst,  
         [DllImport(            
 
         
 
 
          MessageWindow
 
                        
               _uID =               
            
                               notifyIcon =  
                                
                      _uID = 
   
                WndProc(                 
 
                  (msg.Msg ==                       (()msg.LParam ==                           (()msg.WParam ==                              
                              (notifyIcon.Click !=                                  notifyIcon.Click(notifyIcon,     
           
 
  }

 

接下來就是 使用這個托盤類了。

  SortedList table =                   
          strRes;
          netCount =           caseValue = ; 
              
                                                     
              
             
  
          notifyicon_Click(                                                                                                          
 
 
  
              caseValue =              notifyicon =              notifyicon.Click +=              Assembly asm =             icon =  Icon(asm.GetManifestResourceStream(             notifyicon.Icon =          }

好了,就這些,代碼有些沒用的變量自己去掉即可。

 

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved