Newsgroup: it.comp.lang.visual-basic
Titolo: AIUTO controlli VB6

Non so come nel mio computer mi sono ritrovato dei controlli VB6
(comctl32.ocx e comdlg32.ocx) questi perň creano alcuni problemi....
A volte con il metodo Nodes.Clear di una treeview mi da errore di protezione
generale in comctl32.dll. Ho provato ha riregistrare i controlli VB5 ma VB5
non li carica piů...(dice "Impossibile caricare") CHE FACCIO?
Grazie...
Andrea

salve Andrea,
ci sono 2 metodoi (che conosco):
1).... segue Articolo M$ KB
2) scaricare da M$ un programma che dovrebbe farlo
automaticamente...(ProjUpdg.exe nella nuova owner's area)
saluti
Andrea Montanari
hs...@guest.net
<----------------------->
HOWTO: Upgrade Project to Use the New MSCCOMCTL.OCX in VB6
Last reviewed: August 7, 1998
Article ID: Q190952
   
The information in this article applies to: 
•Microsoft Visual Basic Learning, Professional, and Enterprise Editions for
Windows, version 6.0 
SUMMARY
The following controls are not automatically updated when a Visual Basic
5.0 project is loaded by Visual Basic 6.0.
COMCLTL32.OCX, COMCT232.OCX, and MSCHART.OCX
The project must be manually upgraded to the new Visual Basic 6.0 controls:
MSCOMCTL.OCX, MSCOMCT2.OCX, and MSCHRT20.OCX, respectively. 
MORE INFORMATION
The new controls are not backward compatible with the older versions and,
in accordance with the rules of COM, were given new file names and new
GUIDs. This prevents your application from breaking existing applications
that use the older controls. Because the new controls have new names and
GUIDs, they also have new Typelibs. When you load a Visual Basic project,
it checks the Typelib version. However, Visual Basic does not know the
Controls were updated because the Typelib for the new controls have a
different GUID than the Typelib for the old controls. 
To upgrade a project to the newer version, you must do the following: 
1.Open the VBP file in a text editor, such as Notepad, and change the
line(s) that reference the old version of the OCX to the following: 
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Object={65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0; MSCHRT20.OCX 
Save and close the VBP file. 
2.Open any FRM file (or CTL file) that uses one of the above controls in a
text editor, and change the line(s) that reference the old version of the
OCX to the following: 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX" 
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX" 
3.Change all text that references the old libraries to the new library
names. This means that you need to replace ComCtlLib, Comctl2, and
MSChartLib with MSComCtlLib, MSComCtl2, and MSChart20Lib. For example,
change: 
      ComctlLib.ImageList
to:  MSComctlLib.ImageList
4.Save and close the file. When you open the project in Visual Basic 6.0,
it will use the new MSCOMCTL.OCX, MSCOMCT2.OCX and/or MSCHRT20.OCX
controls. 
NOTE: 
1.IMPORTANT: Before you edit your VBP, FRM, or CTL files, you should backup
all of the files in your project.
   2.While the objects listed in step 1 and 2 are very similar, they are
not identical and the upgrade will not work properly if each is not copied
exactly to the correct file. 
   3.If you get a message stating that the header is corrupt when you
attempt to load the project, you have probably made a copy error. Please go
to your backup and repeat the process. 
   4.If you prefer to continue using the older versions of these controls,
comctl32.ocx and comct232.ocx are included on the Visual Basic 6.0 product
CD-ROM in the \OS\System directory. Mschart32.ocx resides in the
\Common\Tools\VB\Controls directory.