VB.NET或者C# winform开发时,如果使用了Microsoft Visual Basic 6.0 ActiveX,并动态创建该控件实例,那么程序移植到没有安装Visual Basic 6.0的系统会出现如下提示:
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
You must hava a license to use this ActiveX control.
你需要一个许可来使用这个控件
官方的解决方法是:
https://support.microsoft.com/zh-cn/help/326652/how-to-dynamically-add-activex-controls-that-require-run-time-licenses (机器翻译)
https://support.microsoft.com/en-us/help/326651/how-to-dynamically-add-activex-controls-that-require-run-time-licenses (英文)
下面是来自网络的资料,后面的就是许可证密钥:
// Masked Edit Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/BC96F860-9928-11cf-8AFA-00AA00C00905 = mmimfflflmqmlfffrlnmofhfkgrlmmfmqkqj // Chart Control 6.0 (OLEDB) license key HKEY_CLASSES_ROOT/Licenses/12B142A4-BD51-11d1-8C08-0000F8754DA1 = aadhgafabafajhchnbchehfambfbbachmfmb // Common Dialog Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/4D553650-6ABE-11cf-8ADB-00AA00C00905 = gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj // ADO Data Control 6.0 (OLEDB) license key HKEY_CLASSES_ROOT/Licenses/C4145310-469C-11d1-B182-00A0C922E820 = konhqhioohihphkouimonhqhvnwiqhhhnjti // Common Controls-3 6.0 license key HKEY_CLASSES_ROOT/Licenses/38911DA0-E448-11D0-84A3-00DD01104159 = mcpckchcdchjcjcclidcgcgchdqdcjhcojpd // Windows Common Controls-2 5.0 (SP2) license key HKEY_CLASSES_ROOT/Licenses/9E799BF1-8817-11cf-958F-0020AFC28C3B = uqpqnqkjujkjjjjqwktjrjkjtkupsjnjtoun // Windows Common Controls license key HKEY_CLASSES_ROOT/Licenses/57CBF9E0-6AA7-11cf-8ADB-00AA00C00905 = aahakhchghkhfhaamghhbhbhkbpgfhahlfle // Data Bound Grid Control 5.0(SP3) license key HKEY_CLASSES_ROOT/Licenses/556C75F1-EFBC-11CF-B9F3-00A0247033C4 = xybiedobrqsprbijaegcbislrsiucfjdhisl // Data Bound List Controls 6.0 license key HKEY_CLASSES_ROOT/Licenses/096EFC40-6ABF-11cf-850C-08002B30345D = knsgigmnmngnmnigthmgpninrmumhgkgrlrk // Internet Transfer Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/78E1BDD1-9941-11cf-9756-00AA00C00908 = yjrjvqkjlqqjnqkjvprqsjnjvkuknjpjtoun // Multimedia Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/B1EFCCF0-6AC1-11cf-8ADB-00AA00C00905 = qqkjvqpqmqjjpqjjvpqqkqmqvkypoqjquoun // Chart Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/7C35CA30-D112-11cf-8E72-00A0C90F26F8 = whmhmhohmhiorhkouimhihihwiwinhlosmsl // Windows Common Controls-2 6.0 license key HKEY_CLASSES_ROOT/Licenses/4F86BADF-9F77-11d1-B1B7-0000F8753F5D = iplpwpnippopupiivjrioppisjsjlpiiokuj // Windows Common Controls 6.0 license key HKEY_CLASSES_ROOT/Licenses/ED4B87C4-9F76-11d1-8BF7-0000F8754DA1 = knlggnmntgggrninthpgmnngrhqhnnjnslsh // Comm Control 6.0 license key HKEY_CLASSES_ROOT/Licenses/4250E830-6AC2-11cf-8ADB-00AA00C00905 = kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun |