VB写注册表启动项
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
w.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"
End Sub
相关文档:
'大小写字母转换器vb
'界面包括 command、command1、command2、command3 和一个 text 文本框
'command 为“互转”按钮,command1 为“转大”按钮,command2 为“转小”按钮,command3 为“清除”按钮
Private Sub Command_Click()
Dim i As Integer, n As Integer
Dim x As S ......
1.用VB6判断文件存在妙法
在编程时经常会用到判断文件是否存在,比如对文件做读写操作前,或是判断密钥文件是否存在等。判断的方法有很多,有些方法虽很实用,但有点繁琐。其实还可以有更简单的方法,就是使用VB 6.0提供的FileSystemObject对象。
FileSystemObject对象不是VB内置对象,使用前必须首先选择[工程]&rar ......
Option Explicit
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pDisplayName As String
lpTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathfromIDList Lib "shell32.dll" Alias _
"SHGetPa ......
'******************************************************************************************
'* 需要注意的问题 *
'******************************************************************************************
'1.INI文件的路 ......
Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub Command1_Click() '锁定鼠标 到某一位置
......