If CheckUser(TextBox1.Text.Trim, TextBox2.Text.Trim) Then Me.DialogResult = Windows.Forms.DialogResult.OK 'ShowDialogの戻り値 Me.Close Else
Private Sub FMBase_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load me.hide 'FMBaseが表示されていてもよければ、必要なし using Login As new FmLogin if Login.showdialog(Me) <> Windows.Forms.DialogResult.OK then me.close end if End using me.show 'me.hideしないなら、必要なし End Sub