zoukankan      html  css  js  c++  java
  • 隐藏光标与获得光标2----获得光标所在的控件

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;

    namespace 获得当前拥有焦点的控件
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    [DllImport("user32.dll", EntryPoint = "GetFocus")]
    public extern static IntPtr GetF222ocus();

    private void button1_Click(object sender, EventArgs e)
    {
    IntPtr currnetGetFocusedControl = GetF222ocus();
    Control control = Control.FromHandle(currnetGetFocusedControl);
    }
    }
    }

  • 相关阅读:
    day13
    day11作业
    day12
    小结2
    iOS-常见问题
    iOS-ASIHTTPRequest缓存机制
    iOS-文件断点续传
    iOS-Http : GET : POST
    iOS-通信录
    iOS-汉字排序
  • 原文地址:https://www.cnblogs.com/1175429393wljblog/p/5295127.html
Copyright © 2011-2022 走看看