AccessTr.neT
Wscript.shell Ve Vbsystemmodal İle Popup Mesaj - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: Microsoft Access (https://accesstr.net/forum-microsoft-access.html)
+--- Forum: Access Cevaplanmış Soruları (https://accesstr.net/forum-access-cevaplanmis-sorulari.html)
+--- Konu Başlığı: Wscript.shell Ve Vbsystemmodal İle Popup Mesaj (/konu-wscript-shell-ve-vbsystemmodal-ile-popup-mesaj.html)



Wscript.shell Ve Vbsystemmodal İle Popup Mesaj - accessman - 03/06/2020

şu kod ile 
Public Function customClosingMsgBox( _
                                mesaj As String, _
                                Title As String, _
                                Sure As Integer, _
                                Optional Btn As Integer = vbOKOnly, _
                                Optional icn As Integer = vbQuestion, _
                                Optional dfBtn As Integer = vbDefaultButton1) As Integer
On Error GoTo Err_hata

    Dim objWshShell As Variant
    Dim intResult As Variant
       
   
    Set objWshShell = CreateObject("WScript.Shell")
    intResult = objWshShell.PopUp(mesaj, Sure, Title, Btn + icn + dfBtn + vbSystemModal)
   
    Select Case intResult
        Case -1
        Case vbOK '1
        Case vbCancel '2
        Case vbAbort '3
        Case vbRetry '4
        Case vbIgnore '5
        Case vbYes '6
        Case vbNo '7
    End Select
   
Exit_kod:
    customClosingMsgBox = intResult
    Exit Function

Err_hata:
    intResult = -1
    MsgBox Err.description
    Resume Exit_kod
   
End Function
"vbSystemModal" eklemeden önce güzel çalışıyordu şimdi hatalı görüntü çıkıyor
bu "vbSystemModal" nereye eklenmeli



RE: Wscript.shell Ve Vbsystemmodal İle Popup Mesaj - access_delisi - 12/11/2020

Üstteki kodlarda

Public Function customClosingMsgBox( _
mesaj As String, _
Title As String, _
Sure As Integer, _
Optional Btn As Integer = vbOKOnly, _
Optional icn As Integer = vbQuestion, _
Optional dfBtn As Integer = vbDefaultButton1) As Integer

kodu var ama alta yaptığınız ekleme üstte yok

intResult = objWshShell.PopUp(mesaj, Sure, Title, Btn + icn + dfBtn + vbSystemModal)

vbSystemModal kodunun yukarıda da tanimlanması gerekli.