|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding treeview programacticllyI am adding a treeview control programmatically to an ActiveX control using
the Prog ID of 'MSComctlLib.TreeCtrl.2'. This works fine on Windows 98, NT, 2000 and XP but it does not work on Windows 2003. I already tried 'MSComctlLib.TreeCtrl' and that works on 2000 and XP (I don't have 98 or NT to test) but not on 2003. Is there some other value that I need to specify? Thanks Dan "Dan Reber" <dreber@nospam.com> wrote in message Are you creating a setup package for the app?news:u2DyqLhTGHA.2276@tk2msftngp13.phx.gbl... >I am adding a treeview control programmatically to an ActiveX control using >the Prog ID of 'MSComctlLib.TreeCtrl.2'. This works fine on Windows 98, >NT, 2000 and XP but it does not work on Windows 2003. I already tried >'MSComctlLib.TreeCtrl' and that works on 2000 and XP (I don't have 98 or >NT to test) but not on 2003. Is there some other value that I need to >specify? > > Thanks > > Dan -- Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Yes I am, I am using Wise for Windows Installer
Show quoteHide quote "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message news:ubO0vdjTGHA.1576@tk2msftngp13.phx.gbl... > "Dan Reber" <dreber@nospam.com> wrote in message > news:u2DyqLhTGHA.2276@tk2msftngp13.phx.gbl... >>I am adding a treeview control programmatically to an ActiveX control >>using the Prog ID of 'MSComctlLib.TreeCtrl.2'. This works fine on Windows >>98, NT, 2000 and XP but it does not work on Windows 2003. I already >>tried 'MSComctlLib.TreeCtrl' and that works on 2000 and XP (I don't have >>98 or NT to test) but not on 2003. Is there some other value that I need >>to specify? >> >> Thanks >> >> Dan > > Are you creating a setup package for the app? > > -- > Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. > DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm > I you are wondering if MSComctlLib.ocx is installed on the Windows 2003
server then yes it is but the version I am using is from 2002 and the one that is on the server is from 2004. Dan Show quoteHide quote "Dan Reber" <dreber@nospam.com> wrote in message news:OQoEbanTGHA.5900@tk2msftngp13.phx.gbl... > Yes I am, I am using Wise for Windows Installer > > "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message > news:ubO0vdjTGHA.1576@tk2msftngp13.phx.gbl... >> "Dan Reber" <dreber@nospam.com> wrote in message >> news:u2DyqLhTGHA.2276@tk2msftngp13.phx.gbl... >>>I am adding a treeview control programmatically to an ActiveX control >>>using the Prog ID of 'MSComctlLib.TreeCtrl.2'. This works fine on >>>Windows 98, NT, 2000 and XP but it does not work on Windows 2003. I >>>already tried 'MSComctlLib.TreeCtrl' and that works on 2000 and XP (I >>>don't have 98 or NT to test) but not on 2003. Is there some other value >>>that I need to specify? >>> >>> Thanks >>> >>> Dan >> >> Are you creating a setup package for the app? >> >> -- >> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. >> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm >> > > I meant MSCOMCTL.OCX. is installed.
Show quoteHide quote "Dan Reber" <dreber@nospam.com> wrote in message news:ejcpVmnTGHA.4864@TK2MSFTNGP12.phx.gbl... >I you are wondering if MSComctlLib.ocx is installed on the Windows 2003 >server then yes it is but the version I am using is from 2002 and the one >that is on the server is from 2004. > > Dan > > "Dan Reber" <dreber@nospam.com> wrote in message > news:OQoEbanTGHA.5900@tk2msftngp13.phx.gbl... >> Yes I am, I am using Wise for Windows Installer >> >> "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message >> news:ubO0vdjTGHA.1576@tk2msftngp13.phx.gbl... >>> "Dan Reber" <dreber@nospam.com> wrote in message >>> news:u2DyqLhTGHA.2276@tk2msftngp13.phx.gbl... >>>>I am adding a treeview control programmatically to an ActiveX control >>>>using the Prog ID of 'MSComctlLib.TreeCtrl.2'. This works fine on >>>>Windows 98, NT, 2000 and XP but it does not work on Windows 2003. I >>>>already tried 'MSComctlLib.TreeCtrl' and that works on 2000 and XP (I >>>>don't have 98 or NT to test) but not on 2003. Is there some other value >>>>that I need to specify? >>>> >>>> Thanks >>>> >>>> Dan >>> >>> Are you creating a setup package for the app? >>> >>> -- >>> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. >>> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm >>> >> >> > > "Dan Reber" <dreber@nospam.com> wrote in message hmmm.... well, I started a brand new Win2003 server (on Virtual PC) and news:ejcpVmnTGHA.4864@TK2MSFTNGP12.phx.gbl... >I you are wondering if MSComctlLib.ocx is installed on the Windows 2003 >server then yes it is but the version I am using is from 2002 and the one >that is on the server is from 2004. > > Dan tried running this without a setup package. Error said there was no such ocx (mscomctl.ocx). After installing one of our packages that installs the OCX, this ran fine. '======== Private Sub Form_Load() On Error GoTo ErrorTrap With Controls.Add("MSComctlLib.TreeCtrl.2", "Test") .Move 0, 0, ScaleWidth, ScaleHeight .Visible = True .ZOrder End With Terminate: Exit Sub ErrorTrap: MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Desc: " & Err.Description Resume Terminate End Sub '======== This page shows that you're probably using the SP6 version.... http://support.microsoft.com/dllhelp/?dlltype=file&l=55&alpha=MSCOMCTL.OCX&S=1 So... I installed the Hotfix below to see if that was causing the problem.... FIX: The Windows Common Controls Mscomctl.ocx or Comctl32.ocx may cause your application or the Visual Basic 6 IDE to unexpectedly quit, or you may receive a "Divide By Zero" error message http://support.microsoft.com/?kbid=896559 Nope. Still works. -- Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Interesting...I went to the registry and MSComctlLib.TreeCtrl.2 is located
under both HKEY_CLASES_ROOT and HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID with the proper path under InprocServer32. The CLASID listed in HKEY_CLASES_ROOT points to the correct value in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID. And what is strange is that I just tested this on other Windows 2003 servers and it works fine. Dan Show quoteHide quote "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message news:e$e4WUpTGHA.4080@TK2MSFTNGP10.phx.gbl... > "Dan Reber" <dreber@nospam.com> wrote in message > news:ejcpVmnTGHA.4864@TK2MSFTNGP12.phx.gbl... >>I you are wondering if MSComctlLib.ocx is installed on the Windows 2003 >>server then yes it is but the version I am using is from 2002 and the one >>that is on the server is from 2004. >> >> Dan > > hmmm.... well, I started a brand new Win2003 server (on Virtual PC) and > tried running this without a setup package. Error said there was no such > ocx (mscomctl.ocx). After installing one of our packages that installs the > OCX, this ran fine. > '======== > Private Sub Form_Load() > On Error GoTo ErrorTrap > > With Controls.Add("MSComctlLib.TreeCtrl.2", "Test") > .Move 0, 0, ScaleWidth, ScaleHeight > .Visible = True > .ZOrder > End With > > Terminate: > Exit Sub > > ErrorTrap: > MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Desc: " & > Err.Description > Resume Terminate > End Sub > '======== > > This page shows that you're probably using the SP6 version.... > http://support.microsoft.com/dllhelp/?dlltype=file&l=55&alpha=MSCOMCTL.OCX&S=1 > > So... I installed the Hotfix below to see if that was causing the > problem.... > > FIX: The Windows Common Controls Mscomctl.ocx or Comctl32.ocx may cause > your application or the Visual Basic 6 IDE to unexpectedly quit, or you > may receive a "Divide By Zero" error message > http://support.microsoft.com/?kbid=896559 > > Nope. Still works. > > -- > Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. > DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm > "Dan Reber" <dreber@nospam.com> wrote in message HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES *IS* HKEY_CLASSES_ROOTnews:eloJCOqTGHA.4436@TK2MSFTNGP10.phx.gbl > Interesting...I went to the registry and MSComctlLib.TreeCtrl.2 is > located under both HKEY_CLASES_ROOT and > HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID with the proper path under > InprocServer32. > > The CLASID listed in HKEY_CLASES_ROOT points to the correct value in > HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID. The latter is just a "shortcut" to the same registry key -- Reply to the group so all can participate VB.Net: "Fool me once..." I created an app with just the following code
Set o = Controls.Add("MSComctlLib.TreeCtrl.2", "o") With o .Move 0, 0, Me.ScaleWidth, Me.ScaleHeight .Visible = True End With and it works fine. I guess that I have to deal with the ActiveX control vendor now. Thanks for your help. Dan Show quoteHide quote "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message news:e$e4WUpTGHA.4080@TK2MSFTNGP10.phx.gbl... > "Dan Reber" <dreber@nospam.com> wrote in message > news:ejcpVmnTGHA.4864@TK2MSFTNGP12.phx.gbl... >>I you are wondering if MSComctlLib.ocx is installed on the Windows 2003 >>server then yes it is but the version I am using is from 2002 and the one >>that is on the server is from 2004. >> >> Dan > > hmmm.... well, I started a brand new Win2003 server (on Virtual PC) and > tried running this without a setup package. Error said there was no such > ocx (mscomctl.ocx). After installing one of our packages that installs the > OCX, this ran fine. > '======== > Private Sub Form_Load() > On Error GoTo ErrorTrap > > With Controls.Add("MSComctlLib.TreeCtrl.2", "Test") > .Move 0, 0, ScaleWidth, ScaleHeight > .Visible = True > .ZOrder > End With > > Terminate: > Exit Sub > > ErrorTrap: > MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Desc: " & > Err.Description > Resume Terminate > End Sub > '======== > > This page shows that you're probably using the SP6 version.... > http://support.microsoft.com/dllhelp/?dlltype=file&l=55&alpha=MSCOMCTL.OCX&S=1 > > So... I installed the Hotfix below to see if that was causing the > problem.... > > FIX: The Windows Common Controls Mscomctl.ocx or Comctl32.ocx may cause > your application or the Visual Basic 6 IDE to unexpectedly quit, or you > may receive a "Divide By Zero" error message > http://support.microsoft.com/?kbid=896559 > > Nope. Still works. > > -- > Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. > DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm >
Convert HTML to text
Error when running vb app with FlexGrid control Help with disconnected recordset! question -- close adodb connection inside dll CommonDialog sets Windows Default Printer - is Mike Williams out there? Vendor ActiveX control Comparing UDTs ADODB Recordsets into Array WebBrowser vs Pdf.ocx Error creating Oracle object |
|||||||||||||||||||||||