早期VB4的控制項何處尋?

常常在BBS上看到有人問這樣的問題:為什麼我用VB5的完全安裝,還是沒有找到 Sheridan 3D Control?

其實VB5已經不再主動安裝某些控制項,但VB5還是支援這些控制項,只是必須手動安裝,方法是在原版光碟的 Tools/Controls 目錄中,把你需要的Control複製到Windows的System下,再用 Tools/Controls 目錄中的Vbctrls.reg來註冊,就可以正常使用這些控制項。我覺得VB6可能不會再支援這些控制項,所以最好把那些舊的控制項,用具有類似功能的新控制項取代,以免你的專案無法在VB6執行;例如Graph32.ocx用M.S. Chart Control取代、Grid32.ocx用M.S. FlexGrid Control取代、Spin32.ocx用M.S. UpDown Control取代。

以下列出 Tools/Controls 目錄中的說明檔:

\Tools\Controls

This directory contains all of the ActiveX Controls that shipped with Visual 
Basic 4.0 Professional and Enterprise Editions, which are no longer shipping 
with Visual Basic 5.0.

AniBtn32.ocx
Gauge32.ocx
Graph32.ocx
  Gsw32.EXE
  Gswdll32.DLL
Grid32.ocx
KeySta32.ocx
MSOutl32.ocx
Spin32.ocx
Threed32.ocx

The \Tools\Controls\BiDi directory contains a Bi-directional version of 
Grid32.Ocx.

If you have Visual Basic 4.0 Professional or Enterprise Editions installed on 
your machine, you should already have these ActiveX controls available to you in 
Visual Basic 5.0.  

Graph32.ocx has been updated to work properly in Visual Basic 5.0 and it 
requires two additional support files: gsw32.exe and gswdll32.dll.  You must 
place the three files together in the \Windows\System directory or the control 
will not function properly.

If you do not have these controls and wish to use these in Visual Basic 5.0, you 
can install them by:

1. Copy all of the files in this directory to your \WINDOWS\SYSTEM directory.

2. Register the controls by either Browsing to them in Visual Basic itself, or 
manually register them using RegSvr32.Exe.  RegSvr32.EXE can be found in the 
\Tools\RegistrationUtilities directory.  The command line is:

regsvr32.exe grid32.ocx

3. Register the design time licenses for the controls.  To do this, merge the 
vbctrls.reg file found in this directory into your registry.  You can merge this 
file into your registry using RegEdit.Exe (Win95 or WinNT4) or RegEd32.Exe 
(WinNT3.51):

regedit vbctrls.reg

 


[ 上一個 | 首頁 | 重要觀念 | 下一個 ]

This page was written by Jaric on Dec. 20 , 1997. All rights reserved.

Total pageview since 4/6/1999.