• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 11 رای - 2.64 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: به دست آوردن آدرسهای تایپ شده در اینترنت اکسپلورر
حالت موضوعی
#1
ابتدا NameSpace هاي زير را وارد مي كنيم
کد:
using System.Collections.Generic;

using Microsoft.Win32;
سپس تابع زير را استفاده مي كنيم
کد:
public List<string> PopulateUrlList()

        {

            //list the main registry key to open

            String regKey = "Software\\Microsoft\\Internet Explorer\\TypedURLs";

            RegistryKey subKey = Registry.CurrentUser.OpenSubKey(regKey);

            String url;

            //create a list to hold our URL's

            List<string> urlList = new List<string>();

            int counter = 1;

            while (true)

            {

                //grab the current value, in the registry the key name

                //is url1, url2, url3, etc, while the value is the

                //actual url

                String sValName = "url" + counter.ToString();

                url = (String)subKey.GetValue(sValName);

                if ((object)url == null)

                    break;

                urlList.Add(url);

                counter++;

            }

            return urlList;

        }
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  سورس کد پاک کردن تمپ فایل اینترنت اکسپلور (سی شارپ) Amin_Mansouri 0 2,888 05-02-2012، 12:57 PM
آخرین ارسال: Amin_Mansouri
  طریقه بدست آوردن میزان کارکرد(روشن بودن) سیستم (به دقیقه) Ghoghnus 0 2,636 10-31-2011، 03:25 PM
آخرین ارسال: Ghoghnus
  بدست آوردن IP یک سیستم Ghoghnus 0 5,220 10-31-2011، 03:10 PM
آخرین ارسال: Ghoghnus
  خالی کردن کش اینترنت اکسپلورر(emety cach folder) Ghoghnus 0 2,218 10-31-2011، 02:50 PM
آخرین ارسال: Ghoghnus
  به دست آوردن اندازه تصویر Ghoghnus 0 2,055 10-31-2011، 02:30 PM
آخرین ارسال: Ghoghnus
  برسی وضعیت اتصال به اینترنت Ghoghnus 1 3,079 06-14-2011، 06:51 AM
آخرین ارسال: Amin_Mansouri

پرش به انجمن:


Browsing: 1 مهمان