开发工具:
文件大小: 127kb
下载次数: 0
上传时间: 2012-02-12
详细说明: VB6.0界面美化不带任何附件的简单实现方法 VB6.0界面美化往往生成的exe往往要带有bas、dll、ocx等等东西。很麻烦。 所以介绍下面的美化方法生成的exe后就一个exe。没有任何的附件。 首先准备3个美化的东东:vb6.0 she皮肤调用模块.bas、aero.she、SkinH_VB6.dll。 新建工程,在“外接程序”——“外接程序管理器”——“vb6资源编辑器” 然后在“工具”——“资源编辑器”里面添加:vb6.0 she皮肤调用模块.bas、aero.she、SkinH_VB6.dll这3个文件,分别命名为(101, "CUSTOM")、(102, "CUSTOM")、(103, "CUSTOM") 好了。在工程1里面添加模块1(Module1):在Module1添加代码: Sub Main() Dim bas As String bas = TheSystemDir() & "\vb6.0 she皮肤调用模块" Dim OPEN1() As Byte OPEN1 = LoadResData(101, "CUSTOM&qu ot;) Open bas For Binary As #1 Put #1, , OPEN1 Close #1 Dim she As String she = TheSystemDir() & "\aero.she" Dim OPEN2() As Byte OPEN2 = LoadResData(102, "CUSTOM") Open she For Binary As #1 Put #1, , OPEN2 Close #1 Dim dll As String dll = TheSystemDir() & "\SkinH_VB6.dll" Dim OPEN3() As Byte OPEN3 = LoadResData(103, "CUSTOM") Open dll For Binary As #1 Put #1, , OPEN3 Close #1 Form1.Show End Sub 在工程1里面添加模块2(Module):在Module添加代码: Public Declare Function SkinH_Attach Lib "SkinH_VB6.dll" () As Long Public Declare Function SkinH_AttachEx Lib "SkinH_VB6.dll" (ByVal lpSkinFile As String, ByVal lpPasswd As String) As Long Public Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Declare Function GetSystemDirectory Lib "kernel32.dll" Alias "GetSystemDirectoryA" (ByVal strBuffer As String, ByVal lngSize As Long) As Long Private Const MAX_PATH = 260 Public Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long Public Const MF_BYPOSITION = &H400;& Public Function TheSystemDir() As String Dim strBuffer As String Dim l As Long strBuffer = Space(255) l = GetSystemDirectory(strBuffer, 255) TheSystemDir = Left(strBuffer, l) End Function Public Function windir() As String Dim lpBuffer As String lpBuffer = Space$(MAX_PATH) windir = Left$(lpBuffer, GetWindowsDirectory(lpBuffer, MAX_PATH)) End Function 好了。在Form1下面添加代码: Private Sub Form_Load() SkinH_AttachEx TheSystemDir() & "\aero.she", "" End Sub 最后在“工程”——“工程1属性”里面将“启动对象”改为“Sub Main”。 生成一个exe看看效果。 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.