程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> C# >> C#入門知識 >> win7 游戲全屏問題(C#解決)

win7 游戲全屏問題(C#解決)

編輯:C#入門知識

using System;
using Microsoft.Win32;
 
namespace Win7游戲全屏補丁
{
    class Program
    {
        static void Main(string[] args)
        {
            RegistryKey system_key = Registry.LocalMachine.OpenSubKey("SYSTEM");
            if (system_key != null)
            {
                RegistryKey ControlSet001_key = system_key.OpenSubKey("ControlSet001");
                if (ControlSet001_key != null)
                {
 
                    RegistryKey Control_key = ControlSet001_key.OpenSubKey("Control");
                    if (Control_key != null)
                    {
 
                       RegistryKey GraphicsDrivers_key = Control_key.OpenSubKey("GraphicsDrivers");
                        if (GraphicsDrivers_key != null)
                        {
 
                 RegistryKey Configuration_key = GraphicsDrivers_key.OpenSubKey("Configuration");
                            if (Configuration_key != null)
                            {
 
                                string[] keynames = Configuration_key.GetSubKeyNames();
                                foreach (string name in keynames)
                                {
                                    if (name.StartsWith("INL"))
                                    {
                                        RegistryKey Inl_key = Configuration_key.OpenSubKey(name);
                                        if (Inl_key != null)
                                        {
                                            RegistryKey oo_key = Inl_key.OpenSubKey("00");
                                            if (oo_key != null)
                                            {
                                             RegistryKey ooo_key = oo_key.OpenSubKey("00", true);
                                                if (ooo_key != null)
                                                {
                                                    if ((int)ooo_key.GetValue("Scaling") != 3)
                                                    {
                                                        ooo_key.SetValue("Scaling", 3);
                                                    }
                                                    Console.WriteLine("補丁已成功打上.");
                                                }
                                            }
                                        }
                                    }
                                }
 
                            }
                        }
                    }
                }
            }
            Console.ReadKey();
        }
    }
}
 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved