制作屏保源码
系统结构:当前信息,自动安装屏保,取Windows目录,GetWindowLong,SetWindowLong,EnumDisplaySettings,隐藏鼠标,GetClientRect,SetWindowPos,SetParent,
======程序集1
| |
| |------ _启动子程序
| |
| |
======窗口程序集1
| |
| |------ _窗口1_创建完毕
| |
| |------ 当前信息
| |
| |------ _窗口1_尺寸被改变
| |
| |------ _时钟1_周期事件
| |
| |------ _图片框1_鼠标位置被移动
| |
| |------ _图片框1_鼠标左键被按下
| |
| |------ _窗口1_将被销毁
| |
| |
======自动安装屏保
| |
| |------ 自动安装屏保
| |
| |
======调用的Dll
| |
| |---[dll]------ 取Windows目录
| |
| |---[dll]------ GetWindowLong
| |
| |---[dll]------ SetWindowLong
| |
| |---[dll]------ EnumDisplaySettings
| |
| |---[dll]------ 隐藏鼠标
| |
| |---[dll]------ GetClientRect
| |
| |---[dll]------ SetWindowPos
| |
| |---[dll]------ SetParent
调用的DLL命令:
.DLL命令 取Windows目录, 整数型, "kernel32.dll", "GetWindowsDirectoryA"
.参数 操作系统目录, 文本型
.参数 目录长度, 整数型
.DLL命令 GetWindowLong, 整数型, "user32.dll", "GetWindowLongA", , 从指定窗口的结构中取得信息
.参数 获取信息的窗口的句柄, 整数型
.参数 欲取回的信息, 整数型, , GWL_STYLE,-16 窗口样式
.DLL命令 SetWindowLong, 整数型, "user32.dll", "SetWindowLongA", , 在窗口结构中为指定的窗口设置信息
.参数 ByValhwnd, 整数型, , 欲为其取得信息的窗口的句柄
.参数 ByValnIndex, 整数型, , 请参考GetWindowLong函数的nIndex参数的说明
.参数 ByValdwNewLong, 整数型, , 由nIndex指定的窗口信息的新值
.DLL命令 EnumDisplaySettings, 整数型, "user32.dll", "EnumDisplaySettingsA", , 取屏幕分辩率
.参数 lpszDeviceName, 整数型
.参数 iModeNum, 整数型
.参数 lpDevMode, DevMode, 传址
.DLL命令 隐藏鼠标, , , "ShowCursor", , 隐藏鼠标
.参数 隐藏鼠标, 逻辑型, , 为假则隐藏鼠标,为真则不隐藏鼠标
.DLL命令 GetClientRect, 整数型, "user32.dll", "GetClientRect"
.参数 ByValhwnd, 整数型, , 窗口句柄
.参数 lpRect, lpRect
.DLL命令 SetWindowPos, 整数型, "user32.dll", "SetWindowPos"
.参数 ByValhwnd, 整数型, , 欲定位的窗口
.参数 ByValhWndInsertAfter, 整数型
.参数 ByValx, 整数型, , 窗口新的x坐标
.参数 ByValy, 整数型, , 窗口新的y坐标
.参数 ByValcx, 整数型, , 指定新的窗口宽度
.参数 ByValcy, 整数型, , 指定新的窗口高度
.参数 ByValwFlags, 整数型
.DLL命令 SetParent, 整数型, "user32.dll", "SetParent"
.参数 ByValhWndChild, 整数型, , 子窗口的句柄
.参数 ByValhWndNewParent, 整数型, , WndChild的新父
注:本站源码主要来源于网络收集。如有侵犯您的利益,请联系我们,我们将及时删除!
部分源码可能含有危险代码,(如关机、格式化磁盘等),请看清代码在运行。
由此产生的一切后果本站均不负责。源码仅用于学习使用,如需运用到商业场景请咨询原作者。
使用本站源码开发的产品均与本站无任何关系,请大家遵守国家相关法律。