- 博客(1)
- 资源 (16)
- 收藏
- 关注
原创 批处理 给已有的快捷方式.LNK加启动参数
set "lnkfile=C:\Users\Public\Desktop\浏览器.lnk"rem 在指定快捷方式的目标项后面添加/增加一个参数值。rem 指定快捷方式的路径。rem 指定添加的参数。
2024-01-16 18:56:33 914 1
VB窗体防VISTA美化资源及源码
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")
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看看效果。
2012-02-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人