⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dropcall.cs

📁 本人觉得C#的软件是不需要源代码的
💻 CS
字号:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace SmartAnswerCall
{
    public static class DropCall
    {
        #region private field
        //End键的VK键值 F4
        private const int VK_F4 = 0x73;
        private const int KEYEVENTF_KEYUP = 0x0002;
        #endregion

        #region public fiield
        //封禁的电话号码单
        public static List<String> BannedList = new List<String>();

        /// <summary>
        /// 模拟一次按键操作
        /// </summary>
        public static void Drop()
        {
            MyRef.keybd_event(VK_F4, 0, 0, 0);
            MyRef.keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
        }
        #endregion
    }

    #region Invoke Class
    public static class MyRef
    {
        //keybd_event API用于想系统发送按键消息
        [DllImport("coredll.dll")]
        public static extern void keybd_event(
            byte bVk,
            byte bScan,
            int dwFlags,
        int dwExtraInfo);
    }
    #endregion
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -