Error: I have to click the cancel(OK, Yes, No) button twice in my form. Components used: Messagebox.show (String,String,messageboxbuttons,Icon) returns dialog result. Example code: Sub Main MessageBox.Show("*Please Note: This is a really long process. Select OK continue or Cancel to exit application.", "SUBMIT CONFIRMATION", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) If (MessageBox.Show("*Please Note: This is a really long process. Select OK continue or Cancel to exit application.", "SUBMIT CONFIRMATION", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.Cancel) Then Me.Close() Else Do something.... End If End Sub Problem: The OK and Cancel buttons must be selected twice before the next line is processed. Solution: Don’t be an idiot! You are calling this function twice! Remove the first MessageBox.Show command. TIMER & PROGRESS BAR TIPS: Don’t attempt to add a timer or progress bar within a long runni...
A repository of information related to STEM education, software integration and development.