- 27 Ocak 2007
- 3,178
- 1
- 603
MsgBox Örneklerini Kullanarak Program Yazılı
Kod:
2 adet frame olusturun
1 tane command buton
ilk frame 6 tane option button
ikinci frame 4 tane option olustur
Private Sub Command1_Click()
Dim d
If Option1.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNo + vbQuestion, "bilgisayar bölümü")
ElseIf Option1.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNo + vbInformation, "bilgisayar bölümü")
ElseIf Option1.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNo + vbExclamation, "bilgisayar bölümü")
ElseIf Option1.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNo + vbCritical, "bilgisayar bölümü")
End If
If Option2.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNoCancel + vbQuestion, "bilgisayar bölümü")
ElseIf Option2.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNoCancel + vbInformation, "bilgisayar bölümü")
ElseIf Option2.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNoCancel + vbExclamation, "bilgisayar bölümü")
ElseIf Option2.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbYesNoCancel + vbCritical, "bilgisayar bölümü")
End If
If Option7.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbRetryCancel + vbQuestion, "bilgisayar bölümü")
ElseIf Option7.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbRetryCancel + vbInformation, "bilgisayar bölümü")
ElseIf Option7.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbRetryCancel + vbExclamation, "bilgisayar bölümü")
ElseIf Option7.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbRetryCancel + vbCritical, "bilgisayar bölümü")
End If
If Option8.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKCancel + vbQuestion, "bilgisayar bölümü")
ElseIf Option8.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKCancel + vbInformation, "bilgisayar bölümü")
ElseIf Option8.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKCancel + vbExclamation, "bilgisayar bölümü")
ElseIf Option8.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKCancel + vbCritical, "bilgisayar bölümü")
End If
If Option9.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbAbortRetryIgnore + vbQuestion, "bilgisayar bölümü")
ElseIf Option9.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbAbortRetryIgnore + vbInformation, "bilgisayar bölümü")
ElseIf Option9.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbAbortRetryIgnore + vbExclamation, "bilgisayar bölümü")
ElseIf Option9.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbAbortRetryIgnore + vbCritical, "bilgisayar bölümü")
End If
If Option10.Value = True And Option3.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKOnly + vbQuestion, "bilgisayar bölümü")
ElseIf Option10.Value = True And Option5.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKOnly + vbInformation, "bilgisayar bölümü")
ElseIf Option10.Value = True And Option4.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKOnly + vbExclamation, "bilgisayar bölümü")
ElseIf Option10.Value = True And Option6.Value = True Then
d = MsgBox("visual basic 6.0 uygulama sınavı", vbOKOnly + vbCritical, "bilgisayar bölümü")
End If
If d = vbYes Then
Label1.Caption = "yes basıldı"
ElseIf d = vbNo Then
Label1.Caption = "no basıldı"
ElseIf d = vbCancel Then
Label1.Caption = "iptal basıldı"
ElseIf d = vbOK Then
Label1.Caption = "ok basıldı"
ElseIf d = vbRetry Then
Label1.Caption = "yeniden dene"
ElseIf d = vbAbort Then
Label1.Caption = "abort basıldı"
ElseIf d = vbIgnore Then
Label1.Caption = "ignore basıldı"
End If
End Sub