Imports System.Windows.Forms

Public Class DefaultParameters

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
    My.Settings.FadeTime = NumericUpDown6.Value
    My.Settings.Interval1 = NumericUpDown1.Value
    My.Settings.Interval2 = NumericUpDown2.Value
    My.Settings.Interval3 = NumericUpDown3.Value
    My.Settings.PanSpeed = NumericUpDown4.Value
    My.Settings.ZoomSpeed = NumericUpDown5.Value
    If RadioButton1.Checked Then
      My.Settings.Aspect = "Show all"
    Else
      My.Settings.Aspect = "Fill screen"
    End If
    Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
    Me.Close()
    End Sub

  Private Sub DefaultParameters_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    NumericUpDown6.Value = My.Settings.FadeTime
    NumericUpDown1.Value = My.Settings.Interval1
    NumericUpDown2.Value = My.Settings.Interval2
    NumericUpDown3.Value = My.Settings.Interval3
    NumericUpDown4.Value = My.Settings.PanSpeed
    NumericUpDown5.Value = My.Settings.ZoomSpeed
    RadioButton1.Checked = (My.Settings.Aspect = "Show all")
    RadioButton2.Checked = Not RadioButton1.Checked
  End Sub
End Class
