Public Class weightSettingForm

    Private Sub weightSettingForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        If mainForm.weightSum = 0 Then
            MsgBox("측정할 무게가 존재하지 않습니다.", vbCritical)
            Me.DialogResult = DialogResult.No
        Else
            txbHighValue.Text = mainForm.weightSum + Val(mainForm.txbWeightPlus.Text)
            txbLowValue.Text = mainForm.weightSum - Val(mainForm.txbWeightMinus.Text)
        End If

        btnOK.Focus()
    End Sub
    Private Sub txbHighValue_GotFocus(sender As Object, e As EventArgs) Handles txbHighValue.GotFocus, txbLowValue.GotFocus
        btnOK.Focus()
    End Sub

    Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
        Me.DialogResult = DialogResult.OK
    End Sub
End Class