个性化你的Windows 7 Taskbar Thumbnail( 四 )


txtBox_TextChanged(lmTextBox, lmTrackBar)
End Sub
Private Sub rmTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rmTextBox.TextChanged
txtBox_TextChanged(rmTextBox, rmTrackBar)
End Sub
Private Sub dtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtTextBox.TextChanged
If dtTextBox.Text <> "" Then
"Delay Time最大值是9999
Try
dtTrackBar.Value = dtTextBox.Text
If dtTrackBar.Value > 9999 Then
Throw New Exception
End If
Catch ex As Exception
dtTrackBar.Value = 512
dtTextBox.Text = "512"
End Try
End If
"如果值为空
If dtTextBox.Text = "" Then
dtTrackBar.Value = 0
dtTextBox.Text = ""
End If
End Sub
#End Region
#Region "TrackBar_Changed"
Private Sub maxSizeTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles maxSizeTrackBar.ValueChanged
trackBar_ValueChanged(maxSizeTextBox, maxSizeTrackBar)
End Sub
Private Sub miniSizeTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miniSizeTrackBar.ValueChanged
trackBar_ValueChanged(miniSizeTextBox, miniSizeTrackBar)
End Sub
Private Sub xsTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xsTrackBar.ValueChanged
trackBar_ValueChanged(xsTextBox, xsTrackBar)
End Sub
Private Sub ysTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ysTrackBar.ValueChanged
trackBar_ValueChanged(ysTextBox, ysTrackBar)
End Sub
Private Sub tmTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmTrackBar.ValueChanged
trackBar_ValueChanged(tmTextBox, tmTrackBar)
End Sub
Private Sub bmTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bmTrackBar.ValueChanged
trackBar_ValueChanged(bmTextBox, bmTrackBar)
End Sub
Private Sub lmTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lmTrackBar.ValueChanged
trackBar_ValueChanged(lmTextBox, lmTrackBar)
End Sub
Private Sub rmTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rmTrackBar.ValueChanged
trackBar_ValueChanged(rmTextBox, rmTrackBar)
End Sub
Private Sub dtTrackBar_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtTrackBar.ValueChanged
trackBar_ValueChanged(dtTextBox, dtTrackBar)
End Sub
#End Region
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)
My.Computer.Registry.SetValue(path, "BottomMarginPx", 16, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "LeftMarginPx", 16, RegistryValueKind.DWord)
My.Computer.Registry.SetValue(path, "RightMarginPx", 16, RegistryValueKind.DWord)
My.Computer.Registry.SetValue("HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Advanced", "ExtendedUIHoverTime", 400, RegistryValueKind.DWord)

推荐阅读