public int ctype = 0; private const int GWL_STYLE = -16; private const int WS_SYSMENU = 0x80000; [System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)] private static extern int GetWindowLong(IntPtr hWnd, int nIndex); [Sys
1.使最小化按钮变灰:setwindowlong(handle,gwl_style,getwindowlong(handle,gwl_style) and not ws_minimizebox ); 2.使最大化按钮变灰:setwindowlong(handle,gwl_style,getwindowlong(handle,gwl_style) and not ws_maximizebox); 3. 关闭按钮变灰色 EnableMenuItem(GetSystemMen
在注册表[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]中创建名字为DisableLockWorkstation值为1的DWORD32值.无需注销重启,立即生效. 直接将以下内容存为扩展名为reg的文件,导入注册表 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curren
1. Windows Forms中禁用窗体的关闭按钮 添加必要的命名空间: using System.Runtime.InteropServices; 添加必要的常数和API函数的引用 private const int SC_CLOSE = 0xF060; private const int MF_ENABLED = 0x00000000; private const int MF_GRAYED = 0x00000001; private const int MF_DISABLED =
Qt支持程序多点触控,就想使用PyQt5做一个触控画板,经过几番周折,查阅了TouchEvent官方文档,又参考了一篇QT for Android的例子,采用eventfilter过滤器来识别触屏事件和鼠标事件,分别作出处理: 其中鼠标事件(用鼠标绘画)固定宽度,触摸事件呢(触摸屏上绘画)采用ellipseDiameters()获取触摸点的宽度,作为笔触宽度. 具体代码见:GitHub import sys import math from PyQt5.QtWidgets import QApp
7月29日开始,腾讯修改了邮箱的加密方式,导致我们线上的所有的腾讯代收.代发邮件的功能全部失效.解决方法在最后,如果需要可直接跳转至解决方法一节 问题出现 7月29日开始,线上的所有的腾讯代收.代发邮件的功能全部失效,报handshake_error: javax.mail.MessagingException: Connect failed; nested exception is: javax.net.ssl.SSLHandshakeException: Received fatal ale