我需要在应用程序图标的本地计算机上获取已安装程序的列表.下面是用于获取已安装程序和已安装目录路径列表的代码段.
/// <summary>
/// Gets a list of installed software and, if known, the software's install path.
/// </summary>
/// <returns></returns>
private string Getinstalledsoftware()
{
//Declare the string to hold the list:
string Software = null;
//The registry key:
string SoftwareKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(SoftwareKey))
{
//Let's go through the registry keys and get the info we need:
foreach (string skName in rk.GetSubKeyNames())
{
using (RegistryKey sk = rk.OpenSubKey(skName))
{
try
{
//If the key …Run Code Online (Sandbox Code Playgroud) 我正在使用ThickBox在我的页面中打开弹出窗口.在弹出窗口中有一个单击选项卡,我需要更改ThickBox弹出窗口的大小.我怎样才能做到这一点 ?
提前致谢.
我正在寻找为在asp.net网站中使用的JQuery日期时间选择器控件创建一个包装器控件.一旦用户控件准备就绪,它将用于简单的Web表单/网格/数据列表或转发器控件.用户控件还将公开下面提到的属性以进行自定义.
遵循JQuery日期时间选择器实现.请参阅演示中的演示.
我愿意接受任何想法或建议.随意评论或分享您的想法.
提前致谢.
我正在尝试使用下面的代码获取IFrame内部HTML.
<iframe src="http://www.msn.com"
width="100%" height="100%" marginwidth="0"
scrolling="no" frameborder="0" id="divInfo"
onreadystatechange="MyFunction(this);"></iframe>
Run Code Online (Sandbox Code Playgroud)
JavaScript代码是
function MyFunction(frameObj)
{
if (frameObj.readyState == "complete")
{
alert(frameObj.document.body.innerHTML);
}
}
Run Code Online (Sandbox Code Playgroud)
但是警报显示了当前文档的html.当frmae就绪状态完成时,如何获得iframe的内部HTML.
如果我使用alert(frameObj.contentWindow.document.body.innerHTML);它给我访问被拒绝错误.
提前致谢.