当前位置: 首页 > news >正文

网站建设方案书 腾讯wordpress侧边栏自定义

网站建设方案书 腾讯,wordpress侧边栏自定义,成都程序员网站,如何做推广推广技巧由于个人需要#xff0c;想找一个键盘记录的程序#xff0c;从网上下载了很多#xff0c;多数都是需要注册的#xff0c;另外也多被杀软查杀。于是决定自己写一个#xff0c;如果作为一个windows应用程序#xff0c;可以实现抓取键盘的记录。想要实现随系统启动的话…由于个人需要想找一个键盘记录的程序从网上下载了很多多数都是需要注册的另外也多被杀软查杀。于是决定自己写一个如果作为一个windows应用程序可以实现抓取键盘的记录。想要实现随系统启动的话其中一种方法就是要作为windows服务把代码直接写到服务里边并不能抓取到键盘的记录从网上翻阅资料及查看msdn才知道 Windows 服务应用程序在不同于登录用户的交互区域的窗口区域中运行。窗口区域是包含剪贴板、一组全局原子和一组桌面对象的安全对象。由于 Windows 服务的区域不是交互区域因此 Windows 服务应用程序中引发的对话框将是不可见的并且可能导致程序停止响应。同样错误信息应记录在 Windows 事件日志中而不是在用户界面中引发。 服务程序一般使用的是LocalSystem帐户拥有自己的window station和Default桌面这个window station是不能于用户交互的也就是说你不能在上面显示窗口它也不接受用户的鼠标、键盘等输入。 我们使用用户帐户登录以后看到的桌面是WinSta0window station下的Defaultdesktop. WinSta0下有3个桌面 WinLogon 以Logon对话框的形式出现.当用户登录以后,WinLogon.exe切换到Default desktop. Default 这是Explorer.exe和所有用户程序窗口出现的地方也就是我们通常使用windows看见的地方.应用程序就运行在这个桌面上 Screen saver 系统空闲的时候运行屏保的桌面. 当你在“计算机管理”中选择一个服务修改属性选择“登录”标签页的“允许服务与桌面交互”那么该服务就使用的是WinSta0window station下的Defaultdesktop. 你也就可以与你的服务进行交互操作了。这时你能获取default的桌面位图因为线程的桌面就是WinSta0下的Default。要想同时获得Winlogon桌面位图应该先把线程的桌面设置成Winlogon。 此部分代码公布如下 //Service1.Designer.cs文件 using System.Threading; namespace KeyBoard{    partial class Service1    {        /// summary         /// 必需的设计器变量。        /// /summary        private System.ComponentModel.IContainer components null;        Thread threadForm null;         /// summary        /// 清理所有正在使用的资源。        /// /summary        /// param namedisposing如果应释放托管资源为 true否则为 false。/param        protected override void Dispose(bool disposing)        {            if (disposing (components ! null))            {                components.Dispose();            }            base.Dispose(disposing);        }         #region 组件设计器生成的代码         /// summary         /// 设计器支持所需的方法 - 不要        /// 使用代码编辑器修改此方法的内容。        /// /summary        private void InitializeComponent()        {            //             // Service1            //             this.ServiceName Service1;         }         #endregion     }} //Service1.cs文件 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.ServiceProcess;using System.Text;using System.Threading;using System.Runtime.InteropServices; namespace KeyBoard{    public partial class Service1 : ServiceBase    {        public Service1()        {            InitializeComponent();        }         protected override void OnStart(string[] args)        {            threadForm new Thread(new ThreadStart(FormShow));            threadForm.Start();        }         protected override void OnStop()        {            if (threadForm ! null)            {                if (threadForm.IsAlive)                {                    threadForm.Abort();                    threadForm null;                }            }         }                void FormShow()        {             GetDesktopWindow();             IntPtr hwinstaSave GetProcessWindowStation();             IntPtr dwThreadId GetCurrentThreadId();             IntPtr hdeskSave GetThreadDesktop(dwThreadId);             IntPtr hwinstaUser OpenWindowStation(WinSta0, false,33554432);             if (hwinstaUser IntPtr.Zero)             {                 RpcRevertToSelf();                 return ;            }             SetProcessWindowStation(hwinstaUser);             IntPtr hdeskUser OpenDesktop(Default, 0, false, 33554432);             RpcRevertToSelf();             if (hdeskUser IntPtr.Zero)             {                 SetProcessWindowStation(hwinstaSave);                 CloseWindowStation(hwinstaUser);                 return ;             }             SetThreadDesktop(hdeskUser);             IntPtr dwGuiThreadId dwThreadId;             MouseKeyBoard fnew MouseKeyBoard(); //此FORM1可以带notifyIcon可以显示在托盘里用户可点击托盘图标进行设置            System.Windows.Forms.Application.Run(f);             dwGuiThreadId IntPtr.Zero;             SetThreadDesktop(hdeskSave);             SetProcessWindowStation(hwinstaSave);             CloseDesktop(hdeskUser);             CloseWindowStation(hwinstaUser);         }         [DllImport(user32.dll)]        static extern int GetDesktopWindow();         [DllImport(user32.dll)]        static extern IntPtr GetProcessWindowStation();         [DllImport(kernel32.dll)]        static extern IntPtr GetCurrentThreadId();         [DllImport(user32.dll)]        static extern IntPtr GetThreadDesktop(IntPtr dwThread);         [DllImport(user32.dll)]        static extern IntPtr OpenWindowStation(string a,bool b,int c);         [DllImport(user32.dll)]        static extern IntPtr OpenDesktop(string lpszDesktop, uint dwFlags,        bool fInherit, uint dwDesiredAccess);         [DllImport(user32.dll)]        static extern IntPtr CloseDesktop(IntPtr p);         [DllImport(rpcrt4.dll, SetLastErrortrue)]        static extern IntPtr RpcImpersonateClient(int i);         [DllImport(rpcrt4.dll, SetLastErrortrue)]        static extern IntPtr RpcRevertToSelf();         [DllImport(user32.dll)]        static extern IntPtr SetThreadDesktop(IntPtr a);         [DllImport(user32.dll)]        static extern IntPtr SetProcessWindowStation(IntPtr a);        [DllImport(user32.dll)]        static extern IntPtr CloseWindowStation(IntPtr a);               } }转载于:https://www.cnblogs.com/mutuan/p/3959847.html
http://www.zqtcl.cn/news/108466/

相关文章:

  • 防城港市网站建设成功网站建设案例
  • 成都公司网站制作公司实验一 电子商务网站建设与维护
  • 即墨区城乡建设局网站300m空间够用吗 wordpress
  • 成都软件开发培训机构7个湖北seo网站推广策略
  • 嘉定企业网站建设深圳网站制作费用
  • 外贸网站有必要吗wordpress远程保存图片
  • 苏州吴中网站建设wordpress中文版安装教程
  • wordpress 网站静态页面赶集网网站建设分析
  • 伊春网站开发大型网站建设兴田德润专业
  • 温州平阳县营销型网站建设榆林做网站
  • 沽源网站建设娄底网站建设工作室
  • 商场网站 策划医疗网站是否全部需要前置备案
  • 电商网站开发实训心得wordpress网络验证
  • 美图网seo 优化技术难度大吗
  • 知名的传媒行业网站开发天空网站开发者
  • 网站域名年费多少钱二手手表交易平台哪个好
  • 用易语言做抢购网站软件下载自己可以做企业网站吗
  • 公司网站续费帐怎么做互联网专业
  • 网站开发公司深圳外贸营销策略
  • 主要搜索引擎网站搜索结果比较wordpress novelist
  • 校园网站制度建设WordPress手机不显示
  • 胶州哪家公司做网站wordpress的html
  • 辽宁省建设厅网站江苏住房和城乡建设厅官方网站
  • 链接关系 网站层次结构南宁做网站找哪家公司
  • 定制网站开发哪家好崇明建设镇网站
  • 上海网站制作建设是什么wordpress管理页面
  • 酒店网站设计的目的和意义网络营销相关理论
  • 用google翻译做多语言网站企业官网建站网站
  • 南阳网站建设培训学校莞城短视频seo优化
  • 开发商城网站建设做网站租用那个服务器好