日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

個性化你的Windows 7 Taskbar Thumbnail

昨天看到How To Geek里的一篇文章, 里面有個小程序做得覺得挺有意思, 那個程序可以改變Windows 7的縮略圖大小, 縮略圖與縮略圖之間的距離, 以及上下左右的邊距, 甚至還可以設置鼠標放到任務欄上多久顯示出縮略圖, 系統(tǒng)默認的是400ms, 感覺有點慢, 我把它調成了1, 鼠標一放上去就冒出縮略圖, 感覺非常的爽. 當然這些都是靠更改注冊表完成的.
我把那個程序下載下來, 用Reflector看一下那個程序, 終于知道是什么原理, 又花了好幾個小時實現(xiàn)了一遍, 當然我寫的代碼肯定沒人家好, 人家是美國的MVP, 我只是個菜鳥:)在這里把實現(xiàn)過程跟大家分享一下, 有哪些寫的不好的地方, 歡迎指教.
改變縮略圖后的大小(可以在這里面看電影了, 呵呵):
更改縮略圖的X-Spacing和Y-Spacing后(可以看到效果還是很明顯的):
程序的核心步驟:
在注冊表目錄HKEY_CURRENT_USER/Software/Microsoft/Windows /CurrentVersion/Explorer/Taskband下新建幾個鍵:MaxThumbSizePx, MinThumbSizePx, ThumbSpacingXPx, ThumbSpacingYPx, TopMarginPx, BottomMarginPx, LeftMarginPx, RightMarginPx 分別用于控制縮略圖尺寸, 兩個縮略圖直接的邊距, 還有縮略圖中內容的上下左右邊距
在注冊表目錄HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Advanced下新建一個鍵: ExtendedUIHoverTime
它用于控制縮略圖顯示的延遲時間(單位是ms)
每次更改完注冊表的信息后, 要看到效果不需要重新開機, 只需要關閉explore.exe, 再重新打開即可.
Private Sub btnApplySettings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApplySettings.Click
My.Computer.Registry.SetValue(path, "MaxThumbSizePx", Convert.ToInt32(maxSizeTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "MinThumbSizePx", Convert.ToInt32(miniSizeTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "ThumbSpacingXPx", Convert.ToInt32(xsTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "ThumbSpacingYPx", Convert.ToInt32(ysTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "TopMarginPx", Convert.ToInt32(tmTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "BottomMarginPx", Convert.ToInt32(bmTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "LeftMarginPx", Convert.ToInt32(lmTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "RightMarginPx", Convert.ToInt32(rmTrackBar.Value), RegistryValueKind.DWord)
My.Computer.Registry.SetValue("HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Advanced", "ExtendedUIHoverTime", Convert.ToInt32(dtTrackBar.Value), RegistryValueKind.DWord)
"修改注冊表后,重啟explore.exe
Dim Explorers() As Process = Process.GetProcessesByName("explorer")
For Each Explorer As Process In Explorers
Explorer.Kill()
Next
Process.Start("explorer.exe")
Explorers = Nothing
End Sub
不用擔心的是, 如果你設置這個設置那個, 搞的很亂, 你可以恢復系統(tǒng)默認值:
Private Sub btnRestoreDefaults_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestoreDefaults.Click
My.Computer.Registry.SetValue(path, "MaxThumbSizePx", 200, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "MinThumbSizePx", 200, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "ThumbSpacingXPx", 16, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "ThumbSpacingYPx", 16, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "TopMarginPx", 16, RegistryValueKind.DWord)

推薦閱讀