VB6.0操作XML文件
<?xml version=”1.0″ encoding=”gb2312″?>
<testlist>
<test>
<id>1</id>
<name>自由飞翔</name>
<time>2007-12-7</time>
</test>
<test>
<id>2</id>
<name>自由</name>
<time>2007-12-7</time>
</test>
</testlist>
以下是VB6.0的代码:
<?xml version=”1.0″ encoding=”gb2312″?>
<testlist>
<test>
<id>1</id>
<name>自由飞翔</name>
<time>2007-12-7</time>
</test>
<test>
<id>2</id>
<name>自由</name>
<time>2007-12-7</time>
</test>
</testlist>
以下是VB6.0的代码:
ClipCursor
ClipCursorByNum
Option Explicit
Dim R As RECT
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function ClipCursor Lib “user32″ (lpRect As RECT) As Long
‘lpRect-鼠标光标限制到的矩形
Private Declare Function ClipCursorByNum Lib “user32″ Alias “ClipCursor” (lpRect As Long) As Long
‘lpRect-传0,取消鼠标光标限制
Private Declare Function SetRect Lib “user32″ (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Sub Form_Load() ‘窗体载入后,鼠标只能在窗体范围内移动
SetRect R, Left / Screen.TwipsPerPixelX, Top / Screen.TwipsPerPixelY, (Left + Width) / Screen.TwipsPerPixelX, (Top + Height) / Screen.TwipsPerPixelY
ClipCursor R
End Sub
Private Sub Form_Unload(Cancel As Integer) ‘窗体退出时,取消鼠标光标限制范围
ClipCursorByNum 0
End Sub
1 VBA中的字符串
2 VBA中处理字符串的函数
2.1 比较字符串
2.2 转换字符串
2.3 创建字符串
2.4 获取字符串的长度
2.5 格式化字符串
2.6 查找字符串
2.7 提取字符/字符串
2.8 删除空格
2.9 返回字符代码
2.10 返回数值代表的相应字符
2.11 使用字节的函数
2.12 返回数组的函数
2.13 连接字符串
2.14 替换字符串
2.15 反向字符串
函数SetLayeredWindowAttributes
使用这个函数,可以轻松的实现半透明窗体。按照微软的要求,透明窗体窗体在创建时应使用WS_EX_LAYERED参数(用CreateWindowEx),或者在创建后设置该参数(用SetWindowLong),我选用后者。全部函数、常量声明如下:
Private Declare Function GetWindowLong Lib “user32″ Alias “GetWindowLongA” (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib “user32″ Alias “SetWindowLongA” (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib “user32″ (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
光盘Ramdisk启动过程:
BIOS读光盘引导信息 -> 光盘上的\WXPE\NTDETECT.COM -> SETUPLDR.BIN -> 光盘根目录\WINNT.XPE -> 镜像文件 -> 镜像目录\WXPE\TXTSETUP.SIF ->