Flaming Arrow Glitter Purple

Rabu, 04 September 2013

Visual Basic ( Message Box Activity )

 

Message Box Activity adalah sebuah program pesan yang disampaikan kepada user yang melakukan perintah sehinggah setiap menu yang di buat akan mengarah kepada sebuah pesan atau perintah..
Semangat3x..
Rezpec N PeaCe !!!

CODE

Private Sub cmdCri_Click()
cri = MsgBox("Im a Critical Message Box", vbCritical + vbRetryCancel, "Critical ")
If cri = vbRetry Then
    lblMt.Caption = "Critical Box"
    lblBs.Caption = "Retry"
ElseIf cri = vbCancel Then
    lblMt.Caption = "Critical Box"
    lblBs.Caption = "Cancel"
End If
End Sub

Private Sub cmdExc_Click()

exc = MsgBox("Im an Exclamation Message Box", vbExclamation + vbAbortRetryIgnore, "Exclamation")
   
If exc = vbAbort Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Abort"
ElseIf exc = vbRetry Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Retry"
ElseIf exc = vbIgnore Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Ignore"
End If
End Sub

Private Sub cmdInf_Click()
inf = MsgBox("Im a Information Box", vbInformation + vbOKCancel, "Information Box")

If inf = vbOK Then
    lblMt.Caption = "Information Box"
    lblBs.Caption = "Ok"
ElseIf inf = vbCancel Then
    lblMt.Caption = "Information Box"
    lblBs.Caption = "Cancel"
End If
End Sub

Private Sub cmdInp_Click()
Dim answer As String
answer = InputBox("Enter Your Name", "Input Box")
lblIb.Caption = answer
End Sub

Private Sub cmdQue_Click()
que = MsgBox("Im a Question Message Box", vbQuestion + vbYesNo, "Question Box")
If que = vbYes Then
    lblMt.Caption = "Question Box"
    lblBs.Caption = "Yes"
ElseIf que = vbNo Then
    lblMt.Caption = "Question Box"
    lblBs.Caption = "No"

End If
End Sub

Ganti teks ini dengan informasi mengenai permalink atau apapun di sini.


Tidak ada komentar:

Posting Komentar

facebook komentar