资源描述:
《vb常用代码总结》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、我用UltralSO编辑了下ISO文件:Setup-->setup.sdb文件提取出来编辑,将[ProductKey]T2CRQGDKBVW7KJR8C6CKXMW3D改成[ProductKey]PYHYPWXB3BB2CCMV9DX9VDY8T这样,安装的时候就默认是这个正版的序列号了。还有一种方法就是,不改这个文件,安装后,再添加删除程序的时候可以输入序列号:PYHYP-WXB3B-B2CCM-V9DX9-VDY8T也可以变成正版。VB常川代码总结移动无标题栏的窗^(borderstyle=none)dimmouseXasintegerdimmouseYasinteger
2、dimmoveXasintegerdimmoveYasintegerdimdownasbooleanform_mousedown:'mousedown事件down=truemouseX=xmouseY=yform_mouseup:'mouseup事件down二falseform_mousemoveifdown二truethenmoveX=me」eft?mouseX+XmoveY=me.top-mouseY+Yme.movemoveX,moveYendif**************************************************************
3、*********闪烁控件比如要闪烁一个label(标签)添加一个时钟控件间隔请根据实际盂要设置enabled属性设为true代码为:labell.visible=notlabell.visible禁止使用Alt+F4关闭窗口PrivateDeclareFunctionDeleteMenuLibHuser32n(ByVaihMenuAsLong,ByVainPositionAsLong,ByVaiwFlagsAsLong)AsLongPrivateDeclareFunctionGetMenultemCountLibHuser32H(ByVaihMenuAsLong)AsLon
4、gPrivateConstMF_BYPOSITION=&H400&PrivateSubForm_Load()DimhwndMenuAsLongDimcAsLonghwndMenu二GetSystemMenu(Me.hwnd,0)c=GetMenultemCount(hwndMenu)DeleteMenuhwndMenu,c・1,MF_BYPOSITIONc=GetMenultemCount(hwndMenu)DeleteMenuhwndMenu,c-1,MF_BYPOSITIONEndSub*******************************************
5、****************************启动控制面板大全,打开控制面板CallShell("rundll32.exeshell32.dll,Control_RunDLL",9)'辅助选项属性■键盘CallShell(Hrundll32.exeshell32.dll,Control_RunDLLaccess.cpl^l1'/9)'辅助选项属性■声音CallShell("rundll32.exeshell32.dll,Control_RunDLLaccess.cpl〃2”,9)'辅助选项属性•显示CallShell("rundll32.exeshell32.dll
6、,Control_RunDLLaccess.cpl„3"z9)'辅助选项属性-鼠标CallShell("rundll32.exeshell32.dll,Control_RunDLLaccess.cpl„4"z9)'辅助选项属性•常规CallShell("rundll32.exeshell32.dll,Control_RunDLLaccess.cpl〃5”,9)添加/删除程序属性•安装御载CallShell("rundll32.exeshell32.dll,Control_RunDLLAppwiz.cpl„l",9)'添加/删除程序属性-Windows安装程序CallShell
7、("rundll32.exeshell32.dll,Control_RunDLLAppwi乙cpl〃2",9)•添加/删除程序属性•启动盘CallShell("rundll32.exeshell32.dll,Control_RunDLLAppwiz.cpl„3"z9),显示属性-背景CallShell("rundll32.exeshell32.dll/Control_RunDLLdesk.cpLO",9),显示属性■屏幕保护程序CallShell("rundll32.exeshell32.dll,Con