zoukankan      html  css  js  c++  java
  • C#可调用API接口来获取窗口句柄,代码如下:

    using System; 
      using System.Runtime.InteropServices; 
      namespace tstfindwindow 
      { 
      ///  
      /// Class1 的摘要说明。 
      ///  
      class Class1 
      { 
      [DllImport( "User32.dll ")] 
      public static extern System. IntPtr FindWindowEx(System. IntPtr parent, System. IntPtr childe, string strclass, string strname); 
      ///  
      /// 应用程序的主入口点。 
      ///  
      [STAThread] 
      static void Main(string[] args) 
      { 
      // 
      //TODO: 在此处添加代码以启动应用程序 
      // 
      IntPtr p=FindWindowEx(System.IntPtr.Zero,System.IntPtr.Zero,null,"窗口标题"); 
      } 
      }
  • 相关阅读:
    A % B Problem
    封锁阳光大学
    数楼梯
    海滩防御
    修复公路
    四子连棋
    口袋的天空
    兔子数
    逆序对&求逆序对
    【模板】单源最短路径*
  • 原文地址:https://www.cnblogs.com/ruishuang208/p/3072675.html
Copyright © 2011-2022 走看看