Friday, May 15, 2009

example program use message box in vb

Example

i. The Interface:

You draw three command buttons and a label as shown in Figure



The procedure for the test button:


Private Sub Test_Click()

Dim testmsg As Integer

testmsg = MsgBox("Click to test", 1, "Test message")

If testmsg = 1 Then

Display.Caption = "Testing Successful"

Else

Display.Caption = "Testing fail"

End If

End Sub

No comments:

Post a Comment