VB使用大全 - 15

237、如何判断资料库中某一个 Table 是否存在 (二)?(DAO)

在 问题: 如何判断资料库中某一个 Table 是否存在?(ADO) 中,我们提到了使用 ADO 的方法来判断资料库中的某一个 Table 是否存在,但是它只适用于 VB6,顶多只到 VB5 (注一),然而,DAO 却可适用于 VB6 - VB3 中所有的版本!

虽然是使用 DAO,但是我们仍然是使用错误尝试法来解决今天的问题,我们仍然以 Access 为例,资料库使用 VB 内附的 Biblio.mdb,要注意的地方有二个:

1、记得要设定【专案】【设定引用项目】【Microsoft DAO x.x Object Library】。

2、除了 Table 之外,今天我们也检查 Access 的 Query !

请将以下的程序码复制到表单中,表单中不需要任何控制项:

Const NameNotInCollection = 3265

Dim DB As Database

Private Function ExistsTableQuery(TName As String) As Boolean

Dim Test As String

On Error Resume Next

' 检查这个名称是否出现在 Tables collection 中:

Test = DB.TableDefs(TName).Name

If Err <> NameNotInCollection Then

ExistsTableQuery = True

' 重设 Err 预设值为 0

Err = 0

' 检查这个名称是否出现在 Queries collection 中:

Test = DB.QueryDefs(TName$).Name

If Err <> NameNotInCollection Then

ExistsTableQuery = True

End If

End If

End Function

Private Sub Form_Load()

Set DB = DBEngine.Workspaces(0).Opendatabase("Biblio.mdb")

Debug.Print "BadTable "; IIf(ExistsTableQuery("BadTableName"), "", "不"); "存在."

Debug.Print "Authors "; IIf(ExistsTableQuery("Authors"), "", "不"); "存在."

End Sub

注一

VB5.0 并不包含 ADO 的技术,然而您还是可以在 VB5.0 中使用 ADO。您可以有下列两种方式,取得ADO:

(1) 安装 NT Option Pack 的 IIS 4.0。

(2) 从网路上下载 ADO2.0, 网址为 http://www.microsoft.com/data

238、如何将长文件名转成短文件名格式 (MS-DOS 8.3)(二)?

在【问题: 如何将长文件名转成短文件名格式 (MS-DOS 8.3)】中我们曾经提过这个问题,不过当时我们是使用 GetShortPathName 这个 API 函数,而在【问题185: 如何将短文件名格式转成长文件名?】这个相反的主题中我们并没有使用 API!有网友问我,长文件名转成短文件名可以不必使用 API 吗?我先告诉各位,答案是:当然可以!

在很多情形下,您会需要知道某一个长文件名文件的 8.3 格式短文件名,幸运的是,在一般的情形下,您只要回到 MSDOS 模式,您就可以看到这些长文件名文件的 8.3 格式短文件名!例如:在 MSDOS 之模式下,Program Files 这个目录便变成了 Progra~1。

而如果您知道,您不必使用 GetShortPathName 这个 API 函数,就可以取得这些长文件名文件的 8.3 格式短文件名,您一定会更高兴!因为现在 VB 有提供一个 Scripting Runtime library,您只要使用其中 File 及 Folder 物件的 ShortPath 属性,就可以取得长文件名目录或长文件名文件的 8.3 格式短文件名!

不过在开始之前,一定要记得在【专案】的【引用项目】中,加入【Microsoft Scripting Runtime】!

程序码大致如下:

Private Sub Form_Load()

Dim fso As FileSystemObject

Dim fsoFile As File

Set fso = New FileSystemObject

Set fsoFile = fso.GetFile("C:\MyReallyLongName.txt")

MsgBox fsoFile.ShortPath

Set fsoFile = Nothing

Set fso = Nothing

End Sub

'结果就是 C:\MYREAL~1.TXT

239、如何移动文件到回收站

声明:

Public Type SHFILEOPSTRUCT

hwnd As Long

wFunc As Long

pFrom As String

pTo As String

fFlags As Integer

fAnyOperationsAborted As Long

hNameMappings As Long

lpszProgressTitle As Long

End Type

Public Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long

Public Const FO_DELETE = &H3

Public Const FOF_ALLOWUNDO = &H40

代码:

Dim SHop As SHFILEOPSTRUCT

Dim strFile as string

With SHop

.wFunc = FO_DELETE

.pFrom = strFile + Chr(0)

.fFlags = FOF_ALLOWUNDO

End With

SHFileOperation SHop

240、如何比较两个文件

Function CompFile(F1 as string, F2 as string) as boolean

Dim issame as boolean

Open F1 For Binary As #1

Open F2 For Binary As #2

issame = True

If LOF(1) <> LOF(2) Then

issame = False

Else

whole& = LOF(1) \ 10000 'number of whole 10,000 byte chunks

part& = LOF(1) Mod 10000 'remaining bytes at end of file

buffer1$ = String$(10000, 0)

buffer2$ = String$(10000, 0)

start& = 1

For x& = 1 To whole& 'this for-next loop will get 10,000

Get #1, start&, buffer1$ 'byte chunks at a time.

Get #2, start&, buffer2$

If buffer1$ <> buffer2$ Then

issame = False

Exit For

End If

start& = start& + 10000

Next

buffer1$ = String$(part&, 0)

buffer2$ = String$(part&, 0)

Get #1, start&, buffer1$ 'get the remaining bytes at the end

Get #2, start&, buffer2$ 'get the remaining bytes at the end

If buffer1$ <> buffer2$ Then

issame = False

End If

Close

CompFile = issame

End Function

241、如何启动别的应用程序,并于应用程序结束前返回所需的资料?

在这个范例中,我们会用到一个函数及二个陈述式,说明如下:

Shell 函数: 执行一个执行文件程序,如果成功的话,会返回一个 Variant (Double) 来代表这个程序的 task ID,若不成功,则会返回 o。

语法:Shell(pathname[,windowstyle])

AppActivate 陈述式: 启动一应用程序视窗。

语法:AppActivate title[, wait]

SendKeys 陈述式: 送出一或多个按键讯息到使用中的视窗,就如同在键盘上按下的一样。

语法:SendKeys string[, wait]

它们的完整说明,请自行参阅线上手册或 Msdn!在这里,我们只是要告诉大家一个方法而已!

今天我们要练习的是:在程序中使用 Shell 去执行小算盘,使用 AppActivate 去启动它,使用 SendKeys 传送按键给它做运算,再将运算结果用剪贴簿接收回来,最后关闭小算盘。

在 Form 上放一个 CommandButton 及一个 TextBox,并将以下的程序码复制到 Form 中:

Private Sub Command1_Click()

' 1 启动小算盘并计算

Dim ReturnValue, I

ReturnValue = Shell("Calc.EXE", 1) ' 执行小算盘。

AppActivate ReturnValue ' 启动小算盘。

For I = 1 To 100 ' 设定回圈执行次数。

SendKeys I & "{+}", True ' 按下按键给小算盘

Next I ' 将所有 I 值相加。

SendKeys "=", True ' 取得总和。

' 2 将计算结果抓回程序中

Clipboard.Clear ' 清除剪贴簿内容。

SendKeys "^{C}", True ' 按 CTRL +C 来复制小算盘计算结果。

Text1.Text = Clipboard.GetText ' 将剪贴簿中之计算结果放到 Text1 中。

' 3 关闭小算盘

SendKeys "%{F4}", True ' 按 ALT+F4 来结束小算盘。

End Sub

执行之后您会看到小算盘自动运算,最后将结果 10100 返回 Text1中!OK!

如果您想看分解动作的话,就重新开启一个新的工程,在 Form 上放三个

CommandButton 及一个 TextBox,程序码如下:

Dim ReturnValue

' 1 启动小算盘并计算

Private Sub Command1_Click()

Dim I

ReturnValue = Shell("Calc.EXE", 1) ' 执行小算盘。

AppActivate ReturnValue ' 启动小算盘。

For I = 1 To 100 ' 设定回圈执行次数。

SendKeys I & "{+}", True ' 按下按键给小算盘

Next I ' 将所有 I 值相加。

SendKeys "=", True ' 取得总和。

End Sub

' 2 将计算结果抓回程序中

Private Sub Command2_Click()

Clipboard.Clear ' 清除剪贴簿内容。

AppActivate ReturnValue ' 启动小算盘。

SendKeys "^{C}", True ' 按 CTRL +C 来复制小算盘计算结果。

Text1.Text = Clipboard.GetText ' 将剪贴簿中之计算结果放到 Text1 中。

End Sub

' 3 关闭小算盘

Private Sub Command3_Click()

AppActivate ReturnValue ' 启动小算盘。

SendKeys "%{F4}", True ' 按 ALT+F4 来结束小算盘。

End Sub

当然,结果和上面一个范例是一样的

242、如何在 VB 中使用 Winzip 来压缩文件?

当今市面上压缩软体一大堆,但是如果您想在 VB 程序中做文件压缩的功能,

您知道要怎么做吗?

我不懂一些烦琐的压缩理论,但是我懂得利用现有的压缩软体来替我达到

我想要的功能!

在这个例子中,我要使用 Winzip 来做,所以,如果您想用下面的范例来做

练习的话,先决条件就是您的电脑中一定要有安装 Winzip 才行!

压缩文件 (加入文件):

语法:winzip[32].exe [-min] action [options] filename[.zip] files

参数说明:

-min 最小化

指定 Winzip 执行时为最小化。如果您要使用 -min 这个参数,它必须是命令列参

数的第一个参数。

action 动作

-a add 加入文件

-f freshen 重新整理目前文件

-u update 更新文件

-m move 移动文件

options 选项

Directories 资料夹选项

-r Recurse Directories 含资料夹内内容。

-p Save Extra Directory Info 储存其他层资料夹讯息。

method 决定压缩的方法选项

-ex eXtra 最大 (最慢)

-en Normal 一般 (预设值)

-ef Fast 快速

-es Super fast 最快速

-e0 no compression 不压缩

其他选项

-s 设定密码 密码必须使用双引号括起来。

例如:-s "Secret Password",不过要注意大小写是不同的!

-hs   包含符合条件的隐藏及系统文件。

filename.zip 压缩文件名

指定压缩后的文件名,要注意的是必须是全路径文件名 (含磁盘代号及资料夹)。

files 所有原始文件

一个或多个文件,每一个文件写在独立的一行,可以使用万用字元,例如:*.bak。

解压缩文件:

语法:winzip[32].exe -e [options] filename[.zip] directory

参数说明:

-e 表示解压缩

是必要的参数!

options 选项

-o Overwrite existing files

without prompting 取代同名的文件。

-j Junk pathnames 跳过旧文件。

除非指定 -J 这个参数,否则会使用原本的资料夹名称。

-s 设定密码 密码必须使用双引号括起来。

例如:-s "Secret Password",不过要注意大小写是不同的!

-hs   包含符合条件的隐藏及系统文件。

filename.zip 压缩文件名

指定压缩后的文件名,要注意的是必须是全路径文件名 (含磁盘代号及资料夹)。

directory 资料夹

解压缩后的文件存放的资料夹。如果资料夹不存在便会自动建立。

注意事项:

※非常重要:

永远使用全路径文件名 (含磁盘代号及资料夹)。

※若希望执行 Winzip 时是最小化,要使用 -min 这个参数,它必

须是命令列参数的第一个参数。

※Winzip 内建只支援 zip 及 unzip 二种操作模式。

※若是长文件名的话,必须使用双引号括起来。

※在设定文件时,前导及最后的字符不可空白,也不可有空白行!

※在命令列中的动作及选项参数,至少要用一个以上的空白分隔。

※WinZip 可以用来配合 cc:Mail 压缩文件:

更改 WMAIL.INI 中的 [cc:Mail] section 的 compress= 这一行

指定 Winzip 的完整路径,并跟随著 "-a %1 @%2" 参数

例如:如果 Winzip 安装在 c:\winzip,则 compress= 这一行必须改成

compress=c:\winzip\winzip.exe -a %1 @%2

范例程序:

Private Sub Command1_Click()

Dim wzipexe As String ' winzip 执行文件的位置

Dim wsource As String ' 原始文件 (压缩前)

Dim wtarget As String ' 目地文件 (压缩后)

Dim wcmd As String ' Shell 指令

Dim retval As Double ' Shell 指令返回值

'拼凑 Shell 指令

wzipexe = "C:\program files\winzip\WINzip32"

wtarget = "c:\TargetFolder\AssignedNameFile.zip"

wsource = "c:\SourceFolder\SourceFile(s)"

wcmd = wzipexe & " -a " & wtarget &

" " & wsource

retval = Shell(wcmd, 6)

'上面的一大串可写成

'retval = Shell("C:\program files\winzip\WINzip32 -a c:\TargetFolder\AssignedNameFile.zip c:\SourceFolder\SourceFile(s)", 6)

End Sub

243、如何取得临时文件名

声明:

Public Const MAX_PATH = 260

Public Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long

Public Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

代码:

Public Function GetTempFile() As String

Dim lngRet As Long

Dim strBuffer As String, strTempPath As String

'初始化 buffer

strBuffer = String$(MAX_PATH, 0)

'取得临时路径

lngRet = GetTempPath(Len(strBuffer), strBuffer)

'0 错误

If lngRet = 0 Then Exit Function

'去掉尾中的 null

strTempPath = Left$(strBuffer, lngRet)

'初始化 buffer

strBuffer = String$(MAX_PATH, 0)

'取得临时文件名

lngRet = GetTempFileName(strTempPath, "tmp", 0&, strBuffer)

If lngRet = 0 Then Exit Function

lngRet = InStr(1, strBuffer, Chr(0))

If lngRet > 0 Then

GetTempFile = Left$(strBuffer, lngRet - 1)

Else

GetTempFile = strBuffer

End If

End Function

244、如何确定是 Windows 的可执行文件

在文件的第 24 字节,如果为40h,就是 Windows 的可执行文件。

Function WinExe (ByVal Exe As String) As Integer

Dim fh As Integer

Dim t As String * 1

fh = FreeFile

Open Exe For Binary As #fh

Get fh, 25, t

Close #fh

WinExe = (Asc(t) = &H40&)

End Function

245、如何取得文件的扩展名

Function GetExtension(Filename As String)

Dim PthPos, ExtPos As Integer

For i = Len(Filename) To 1 Step -1 ' Go from the Length of the filename, to the first character by 1.

If Mid(Filename, i, 1) = "." Then ' If the current position is '.' then...

ExtPos = i ' ...Change the ExtPos to the number.

For j = Len(Filename) To 1 Step -1 ' Do the Same...

If Mid(Filename, j, 1) = "\" Then ' ...but for '\'.

PthPos = j ' Change the PthPos to the number.

Exit For ' Since we found it, don't search any more.

End If

Next j

Exit For ' Since we found it, don't search any more.

End If

Next i

If PthPos > ExtPos Then

Exit Function ' No extension.

Else

If ExtPos = 0 Then Exit Function ' If there is not extension, then exit sub.

GetExtension = Mid(Filename, ExtPos + 1, Len(Filename) - ExtPos) 'Messagebox the Extension

End If

End Function

使用:

FileExt = GetExtension("c:\windows\vb\vb.exe")

246、您知道 Microsoft 不再支持那些 VB 的版本吗?

Microsoft 的每一个软件,一年一年的推出新版本,但是并不会立刻就不支持旧的版本,通常都是新旧并行,而且我认为有一点点可恶的是,通常 Microsoft 推出新版本的同时,却还是继续卖旧的版本!

但是对于旧版本的支持并不是永久的,一段时间之后, Microsoft 就会宣判某一个软件的某一个版本死刑!并且将这些资讯公布在 Microsoft product support services 的网页上。

您知道到目前 (88.12.24) 为止,有那些 Microsoft 的软件被判死刑了吗 (指 Microsoft 技术中心不再支持)?列表如下,您看看有没有您还在使用的软件版本,如果有的话,该准备升级了!

不再支持的旧软件版本

可取代的新软件版本

A.L.D.S. (CPM/80)

MASM

Access Communications Package 1.02

Works for Windows

Access Distribution Kit 1.0

Access versions 7.0, 97

Access for Windows, 1.x

Access versions 7.0, 97

Access Solutions Pack 1.0

n/a

Adventure for the Apple II

n/a

Altimera Composer for Windows

SoftImage product line

Apple II and Apple III Operating Systems

n/a

Assembler 3.44

MASM 6.1

Asymetrix Daybook 1.0

Schedule+ for Windows

AutoDemo for Macintosh, 1.0

n/a

AutoMac 2.1

Excel for the Macintosh

Automap Road Atlas 3.x for MS-DOS

Automap Trip Planner for Windows 95 or Automap Road Atlas 4.0 for Windows

Basic Compiler 5.3 (CPM/80)

Visual Basic

Basic Compiler for SoftCard 5.35 (CPM/80)

Visual Basic

Basic Interpreter 5.21 (CPM/80)

Visual Basic

Beta Software Migration Kit (OS/2)

Windows NT Resource Kit

Bob

Works and Home Essentials Bundle

Bookshelf 87 for MS-DOS

Bookshelf for Windows

Bookshelf 91 for MS-DOS

Bookshelf for Windows

C/C++ Compiler 7.0

Visual C 4.2

Chart

Excel or Works

Chart 1.02 for the Macintosh

Excel for the Macintosh

Chart 3.0 for MS-DOS

Excel for Windows

Cobol

Third-party support   Micro Focus

CPM/80 Operating System

Windows 95

DCA/MS Comm Server Workstation 8.0 (OS/2)

SNA and SQL Server

Decathlon for the Apple II 1.0

Full line of Microsoft Games

Edit (CPM/80)

Notepad in Windows 95

Excel Q+E

n/a

FILE for Macintosh

Works for Macintosh

Fortran

Digital Purchased Fortran 1-800-DIGITAL

FoxPro for Macintosh Professional and Standard 2.5 and 2.6

FoxPro for Macintosh 3.0 or Visual FoxPro for Windows

FoxPro for MS-DOS, 1.0, 2.0, 2.5 and 2.6

Visual FoxPro for Windows

FoxPro for MS-DOS and Windows Connectivity Kit 2.5

Visual FoxPro for Windows

FoxPro for MS-DOS Distribution Kit 2.0 and 2.5

Visual FoxPro for Windows

FoxPro for MS-DOS Library Construction Kit 2.0

Visual FoxPro for Windows

FoxPro for UNIX, 2.6

Visual FoxPro for Windows

FoxPro for Windows, 2.5 and 2.6

Visual FoxPro for Windows

FoxPro for Windows Distribution Kit 2.5

Visual FoxPro for Windows

FoxPro for Windows Library Construction Kit 2.5

Visual FoxPro for Windows

Internet Services Network 98

n/a

LAN Manager 2.0 Multiprocessor 2.0 (OS/2)

Windows NT Server

Learn MS-DOS

n/a

MAC Enhancer 2.0

n/a

MACH 10 and 20 v 1.0

n/a

Mach Daughter Board 10 and 20

80286 processor

MASM 6.0

MASM 6.11a

Mediaview Author

n/a

Microsoft Delta

SourceSafe

Mouse PC Paintbrush 3.1

Paintbrush featured in Windows 95

Mouse Show Partner 2.2

Slideshow feature in PowerPoint

MS Profit for Windows

Microsoft Money

Multimedia Viewer

Internet Studio

Multiplan 1.06 for the CPM/80

Excel for the Macintosh

Multiplan 1.07 for the Apple II

Excel for the Macintosh

Multiplan 4.0 for OS/2

Excel for Windows

Mutliplan 1.12 for the Apple III

Excel for the Macintosh

NT Hardware Capability Test

n/a

OEM Money 2.0

Microsoft Money

OEM Works for MS-DOS

Works for Windows

OS/2 Binary Adaptation Kit 1.0

NT Windows 32 SDK, NT, MSDN

OS/2 Device Driver Development Kit 1.0

Third-party support - IBM; Windows NT DDK

OS/2 for the MAC 20 1.0

n/a

OS/2 Programmer's Toolkit 1.0

Third-party support - IBM; Windows 32 SDK

OS/2 Software Development Kit 1.1

Third-party support - IBM; Windows 32 SDK for Windows NT

OS/2 Video Adaptation Kit 1.0

Windows NT

Pageview for MS-DOS, 1.0

Publisher

Pascal

Third-party support   Microfocus

PC Junior Booster 1.0

n/a

Premium Software II 2.26B

n/a

Presentation Manager 1.1 (OS/2)

NT Presentation Manager Sub System

Quick Basic for Macintosh

Visual Basic for Applications in Office for the Macintosh

Quick Basic for MS-DOS

Visual Basic 5.0

Quick Basic Professional Development System (PDS)

Visual Basic 5.0

QuickC for Windows

Visual C 4.2 Standard

Small Business Consultant for MS-DOS, 1.0

Microsoft Small Business Pack

SoftCard 2.23 (CPM/80)

n/a

SoftCard II, version 2.28B (CPM/80)

n/a

SourceSafe 3.0 and 3.1

Visual SourceSafe 5.0

SourceSafe for the Macintosh, 3.0

Visual SourceSafe 5.0

SQL Server for OS/2

SQL Server for Windows NT

Typing Tutor 1.2 for the Apple II

Mavis Beacon Typing by Software Toolworks

Upgrade Advisor for Windows

Help files in Windows 95

Visual Basic for MS-DOS, 1.0

Visual Basic for Windows, 5.0

Visual Basic for Windows Professional and Standard Editions 1.0, 2.0, and 3.0

Visual Basic for Windows, 5.0

Visual C for Macintosh Add-on 2.1

Visual C Macintosh Add-on 4.0

Visual C for Windows NT (Alpha) 2.0

Visual C 4.0 for the Alpha

Visual C for Windows NT (MIPS) 2.1

Visual C 4.0 (RISC)

Visual C for Windows NT 1.0 and 2.0

Visual C 4.2

Visual C for Windows Professional 1.0

Visual C 4.2

Visual C for Windows Standard

Visual C 4.2

Visual Test 1.0, 2.0, 3.0, and 4.0

Contact Rational for support at (800) 728-1212 (inside the U.S. and Canada) or +1-703-761-4400 (outside the U.S. and Canada).

Windows/MS-DOS Bundle

Windows 95

Windows Printing System 1.0

Windows 95 Print Engine

Word for Macintosh, 1.x

Word for Macintosh, 5.x and higher

Word for MS-DOS, 1.0

Word for Windows

Word for Windows, 1.x

Word for Windows, 6.0 or Word 97

Works for Macintosh, 1.0 and 2.0

Works for Macintosh, 4.0

Works for MS-DOS, 1.0 and 2.0

Works for Windows

247、您知道 Microsoft 不再更新 COMCTL32, COMCT232, MSChart 三个控制项的新版本了吗?

当您从 VB5 升级到 VB6 时,或许您会注意到 COMCTL32.OCX, COMCT232.OCX, MSChart.OCX 三个控制项的版本仍然是 5.0(SP2),刚开始,我以为 Microsoft 不再升级这三个控制项了,不过我错了!

这三个控制项有升级的版本,但是 Microsoft 改变了它们的文件名称、介面,

而且,在您将项目从 VB5 升级到 VB6 时,VB6 也不会主动升级这些控制项!

它们的新旧文件名对照如下:

旧文件名

新文件名

comctl32.ocx

mscomctl.ocx

comct232.ocx

mscomct2.ocx

mschart.ocx

mschrt20.ocx

现在请勿马上动手开始修改程序,如果您想手动 Upgrade 这些控制项到新的版本,您一定会后悔!因为在您手动 Upgrade 之后,您一执行就会出现错误讯息!而且是没有说明按钮的错误讯息!

现在,在 Microsoft 的网站上有提供一个升级工具程序,叫做 ActiveX Control Upgrade Utility,它会侦测您的项目,并自动 Upgrade 这些应该升级的控制项!它很容易使用,而且效果很好,如果您想知道更多的讯息,或想下载这个工具程序,可以到以下这个网址去:

http://msdn.microsoft.com/vbasic/downloads/axupgrade.asp

在这里,您也可以直接下载这个工具程序:

注:如果您不想看 Microsoft 的英文说明,我将它翻译在下面好了:

Visual Basic, Version 6.0, ActiveX Control Upgrade Utility

这个升级工具会将您以前使用 VB5.0 及较早前发行的 VB6.0 版本开发的项目,其中较旧版本的 ActiveX 控制项升级到目前的 VB6.0 最新版本的 ActiveX 控制项,它可以升级的控制项包括以下三个:

描述的名称

.OCX 文件名称

Microsoft Windows Common Controls

COMCTL32.OCX

Microsoft Windows Common Controls-2

COMCT232.OCX

Microsoft Chart Control

MSChart.OCX

如果在您开发的项目中,不包含以上三个控制项,那么它什么也不会做!

( 意思就是说,如果项目中,不含以上三个控制项,您根本就不用使用这个升级工具 )

在您使用升级工具将项目转换完成后,以上三个控制项会变成:

描述的名称

.OCX 文件名称

Microsoft Windows Common Controls 6.0

MSCOMCTL.OCX

Microsoft Windows Common Controls-2 6.0

MSCOMCT2.OCX

Microsoft Chart Control 6.0 (OLEDB)

MSChrt20.OCX

要特别注意的是,在转换前最好先备份您用 VB5 开发的项目!且不要使用 binary compatibility 转换!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值