第一步、百分之九十九都是运行环境问题,先重新下载注册mscomctl.ocx控件
1、下载MSCOMCTL.OCX并将对应版本的MSCOMCTL.OCX文件复制到“ X:/Windows/system32 ”
或“ X:/Windows/SysWOW64 ”目录下。mscomctl64位下载
2、已管理员权限运行DOS窗口 。
3、32位-在“Dos窗口中输入 regsvr32 C:\Windows\Syswow32\mscomctl.ocx 回车即可。
64位-在“Dos窗口中输入 regsvr32 C:\Windows\SysWOW64\mscomctl.ocx 回车即可。
第二步、新建一个文件。并将以下代码复制并保存为.reg格式后运行,完成注册表就可以恢复正常调用了
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Licenses] @="Licensing: Copying the keys may be a violation of established copyrights." [HKEY_CLASSES_ROOT\Licenses\096EFC40-6ABF-11cf-850C-08002B30345D] @="knsgigmnmngnmnigthmgpninrmumhgkgrlrk" [HKEY_CLASSES_ROOT\Licenses\12B142A4-BD51-11d1-8C08-0000F8754DA1] @="aadhgafabafajhchnbchehfambfbbachmfmb" [HKEY_CLASSES_ROOT\Licenses\190B7910-992A-11cf-8AFA-00AA00C00905] @="gclclcejjcmjdcccoikjlcecoioijjcjnhng" [HKEY_CLASSES_ROOT\Licenses\1F3D5522-3F42-11d1-B2FA-00A0C908FB55] @="gcfjdjecpchcncdjpdejijgcrdoijjfcieod" [HKEY_CLASSES_ROOT\Licenses\1FB639E1-771F-11d1-8FD4-00A0C91E29D5] @="ldaskjeinankjgbnkcejnkrgnkvntkhzkhbtnkste" [HKEY_CLASSES_ROOT\Licenses\2AC5863D-48B9-490c-ACD3-B7723A1FEB9E] @="wrtgfdsbvxgfsdyuihjknmvcxgasdwqersdfdfsdyu" [HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d] @="mlrljgrlhltlngjlthrligklpkrhllglqlrk" [HKEY_CLASSES_ROOT\Licenses\38911DA0-E448-11D0-84A3-00DD01104159] @="mcpckchcdchjcjcclidcgcgchdqdcjhcojpd" [HKEY_CLASSES_ROOT\Licenses\4250E830-6AC2-11cf-8ADB-00AA00C00905] @="kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun" [HKEY_CLASSES_ROOT\Licenses\43478d75-78e0-11cf-8e78-00a0d100038e] @="imshohohphlmnhimuinmphmmuiminhlmsmsl" [HKEY_CLASSES_ROOT\Licenses\46D504D7-557F-4C19-A4DD-6605411EF496] "6A7693BA-3139-41fd-BF3D-299961C965D5"="01000000d08c9ddf0115d1118c7a00c04fc297eb01000000b0cfa8651eed814ea8aa77984d1819530400000018000000560053002000500049004400200049006e0066006f00000003660000a80000001000000056a66542c85db014774bffecdc56384e0000000004800000a000000010000000b10a1f771bc4b05515b611500ced2faf10000000263d1b0a183042c62cd7792b75683b4e14000000f30b3972d0fa2871120efa9fba18a3c245e584c2" @="gknalnanccemnhitviluhawerycnonilwjawreacop" "CCF5A555-D92E-457b-9235-2B326B64035A"="01000000d08c9ddf0115d1118c7a00c04fc297eb01000000b0cfa8651eed814ea8aa77984d1819530400000018000000560053002000500049004400200049006e0066006f00000003660000a8000000100000003311a4ed781bba0eb740244ec6be37e10000000004800000a0000000100000000ef4da56cd76cee7c81f1227b555434f080000000beff2eed562c9a114000000b389c01205cde0aa29234083954295bef840a8c3" [HKEY_CLASSES_ROOT\Licenses\4D553650-6ABE-11cf-8ADB-00AA00C00905] @="gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj" [HKEY_CLASSES_ROOT\Licenses\4F86BADF-9F77-11d1-B1B7-0000F8753F5D] @="iplpwpnippopupiivjrioppisjsjlpiiokuj" [HKEY_CLASSES_ROOT\Licenses\556C75F1-EFBC-11CF-B9F3-00A0247033C4] @="xybiedobrqsprbijaegcbislrsiucfjdhisl" [HKEY_CLASSES_ROOT\Licenses\57CBF9E0-6AA7-11cf-8ADB-00AA00C00905] @="aahakhchghkhfhaamghhbhbhkbpgfhahlfle" [HKEY_CLASSES_ROOT\Licenses\5BCBC240-27DF-49C1-8C1C-27B8463009A9] "6A7693BA-3139-41fd-BF3D-299961C965D5"="01000000d08c9ddf0115d1118c7a00c04fc297eb01000000b0cfa8651eed814ea8aa77984d18195304000000560000004d006900630072006f0073006f00660074002000560069007300750061006c002000530074007500640069006f00200054007200690061006c002000450064006900740069006f006e0020006400610074006100000003660000a800000010000000c7e1d2e887c57b9814ce91d6c44249ae0000000004800000a00000001000000035f65ddd0c11d820b0b7a72d384e4f08100000006e568533309b0e78012ede394f29e6d81400000080691310641b0c5f28070f7f29fe3acb3d3531a9" @="iqtdwslvccydcyhxabrcudupqdcalezvinyxwsdjgb" "CCF5A555-D92E-457b-9235-2B326B64035A"="01000000d08c9ddf0115d1118c7a00c04fc297eb01000000b0cfa8651eed814ea8aa77984d18195304000000560000004d006900630072006f0073006f00660074002000560069007300750061006c002000530074007500640069006f00200054007200690061006c002000450064006900740069006f006e0020006400610074006100000003660000a800000010000000157910d280b079e9030212f831ef8dd00000000004800000a00000001000000091b4ddfcf5198d358efe2a227e391200080000008943decdf61422b0140000006eafe0247bfe0b38ba34c5a3fc6106d9bae97edb" [HKEY_CLASSES_ROOT\Licenses\6000720D-F342-11D1-AF65-00A0C90DCA10] @="kefeflhlhlgenelerfleheietfmflelljeqf" [HKEY_CLASSES_ROOT\Licenses\6FB38640-6AC7-11cf-8ADB-00AA00C00905] @="gdjkokgdldikhdddpjkkekgknesjikdkoioh" [HKEY_CLASSES_ROOT\Licenses\72E67120-5959-11cf-91F6-C2863C385E30] @="ibcbbbebqbdbciebmcobmbhifcmciibblgmf" [HKEY_CLASSES_ROOT\Licenses\73A4C9C1-D68D-11d0-98BF-00A0C90DC8D9] [HKEY_CLASSES_ROOT\Licenses\73A4C9C1-D68D-11d0-98BF-00A0C90DC8D9\11.0] [HKEY_CLASSES_ROOT\Licenses\73A4C9C1-D68D-11d0-98BF-00A0C90DC8D9\11.0\Retail] @="sbbcdcprktpjtapmmfdacmupasbhscddncgp" [HKEY_CLASSES_ROOT\Licenses\743A8267-4958-460e-B757-7110EED3D53C] @="erwreffdrtetyuiopupoinjxsdfwdxvdgwertdxoui" [HKEY_CLASSES_ROOT\Licenses\74872840-703A-11d1-A3AF-00A0C90F26FA] @="mninuglgknogtgjnthmnggjgsmrmgniglish" [HKEY_CLASSES_ROOT\Licenses\74872841-703A-11d1-A3AF-00A0C90F26FA] @="klglsejeilmereglrfkleeheqkpkelgejgqf" [HKEY_CLASSES_ROOT\Licenses\78E1BDD1-9941-11cf-9756-00AA00C00908] @="yjrjvqkjlqqjnqkjvprqsjnjvkuknjpjtoun" [HKEY_CLASSES_ROOT\Licenses\7C35CA30-D112-11cf-8E72-00A0C90F26F8] @="whmhmhohmhiorhkouimhihihwiwinhlosmsl" [HKEY_CLASSES_ROOT\Licenses\80E80EF0-DBBE-11D0-BCE2-00A0C90DCA10] @="qijimitpmpnpxplpvjnikpkpqoxjmpkpoivj" [HKEY_CLASSES_ROOT\Licenses\899B3E80-6AC6-11cf-8ADB-00AA00C00905] @="wjsjjjlqmjpjrjjjvpqqkqmqukypoqjquoun" [HKEY_CLASSES_ROOT\Licenses\9DF1A470-BA8E-11D0-849C-00A0C90DC8A9] @="cchcqjejhcgcqcfjpdfcdjkckiqikchcojpd" [HKEY_CLASSES_ROOT\Licenses\9E799BF1-8817-11cf-958F-0020AFC28C3B] @="uqpqnqkjujkjjjjqwktjrjkjtkupsjnjtoun" [HKEY_CLASSES_ROOT\Licenses\A133F000-CCB0-11d0-A316-00AA00688B10] @="cibbcimbpihbbbbbnhdbeidiocmcbbdbgdoc" [HKEY_CLASSES_ROOT\Licenses\a8a9f020-b426-11cf-bf3b-00a0d10003fa] @="eesjgjnekjeeheijrfheiegepftigeljfepi" [HKEY_CLASSES_ROOT\Licenses\AC0871D0-6ACC-11cf-8ADB-00AA00C00905] @="knjnpgognginknggsmnnhnjnumvmlngnrlrk" [HKEY_CLASSES_ROOT\Licenses\AEA64E56-7C97-4a1c-8974-4E0BB4E48FCD] @="reuikcxsdrecfgfbvnhjkjlpouiyuqwsdrtrtbvgcv" [HKEY_CLASSES_ROOT\Licenses\B1692F60-23B0-11D0-8E95-00A0C90F26F8] @="mjjjccncgjijrcfjpdfjfcejpdkdkcgjojpd" [HKEY_CLASSES_ROOT\Licenses\B1EFCCF0-6AC1-11cf-8ADB-00AA00C00905] @="qqkjvqpqmqjjpqjjvpqqkqmqvkypoqjquoun" [HKEY_CLASSES_ROOT\Licenses\BC96F860-9928-11cf-8AFA-00AA00C00905] @="mmimfflflmqmlfffrlnmofhfkgrlmmfmqkqj" [HKEY_CLASSES_ROOT\Licenses\C4145310-469C-11d1-B182-00A0C922E820] @="konhqhioohihphkouimonhqhvnwiqhhhnjti" [HKEY_CLASSES_ROOT\Licenses\CDE57A55-8B86-11D0-b3C6-00A0C90AEA82] @="ekpkhddkjkekpdjkqemkfkldoeoefkfdjfqe" [HKEY_CLASSES_ROOT\Licenses\CEDD4F80-B43C-11cf-837C-00AA00573EDE] @=hex(2):67,00,78,00,77,00,61,00,65,00,7a,00,75,00,63,00,66,00,79,00,71,00,70,\ ? 00,77,00,6a,00,67,00,71,00,62,00,63,00,6d,00,74,00,73,00,6e,00,63,00,75,00,\ ? 68,00,77,00,73,00,6e,00,79,00,68,00,69,00,6f,00,68,00,77,00,78,00,7a,00,00,\ ? 00 [HKEY_CLASSES_ROOT\Licenses\D015B071-D2ED-11d0-A31A-00AA00688B10] @="gjdcfjpcmjicjcdcoihcechjlioiccechepd" [HKEY_CLASSES_ROOT\Licenses\DC4D7920-6AC8-11cf-8ADB-00AA00C00905] @="iokouhloohrojhhhtnooiokomiwnmohosmsl" [HKEY_CLASSES_ROOT\Licenses\E32E2733-1BC5-11d0-B8C3-00A0C90DCA10] @="kmhfimlflmmfpffmsgfmhmimngtghmoflhsg" [HKEY_CLASSES_ROOT\Licenses\ED4B87C4-9F76-11d1-8BF7-0000F8754DA1] @="knlggnmntgggrninthpgmnngrhqhnnjnslsh" [HKEY_CLASSES_ROOT\Licenses\F2E1F428-5B9A-4a69-B1F4-28C3C644168A] @="werdfswerxcvfdsertfyuijhnmujhkuyhjkhjkyuiw" [HKEY_CLASSES_ROOT\Licenses\F4FC596D-DFFE-11CF-9551-00AA00A3DC45] @="mbmabptebkjcdlgtjmskjwtsdhjbmkmwtrak"
备注:WinCC中VBS脚本如下:
1 Dim ctrlLV 2 Set ctrlLV=HMIRuntime.Screens("画面").ScreenItems("LV") 3 4 ctrlLV.View =3 '设置外观为报表形式 5 ctrlLV.GridLines =True '显示网格线 6 ctrlLV.ColumnHeaders.Clear '清楚原有表头 7 With ctrlLv.ColumnHeaders 8 .add ,,"",10 9 .add ,,"第一列",100 10 .add ,,"第二列",100 11 .add ,,"第三列",100 12 .add ,,"第四列",100 13 End With 14 ctrlLV.ListItems.Clear '清除原有数据 15 With ctrlLv.ListItems.Add 16 .subitems(1)="第一行第一列数据" 17 .subitems(2)="第一行第二列数据" 18 .subitems(3)="第一行第三列数据" 19 .subitems(4)="第一行第四列数据" 20 End With 21 With ctrlLv.ListItems.Add 22 .subitems(1)="第二行第一列数据" 23 .subitems(2)="第二行第二列数据" 24 .subitems(3)="第二行第三列数据" 25 .subitems(4)="第二行第四列数据" 26 End With