In questo articolo vedremo come personalizzare le MsgBox.
PERSONALIZZAZIONE 1:
All'interno delle MsgBox è possibile visualizzare il testo su più righe utilizzando una serie di stringhe speciali:
Chr(10) & Chr(10)
oppure
Chr(13) & Chr(10)
ESEMPIO 1:
Download Project
PERSONALIZZAZIONE 2:
Le MsgBox possono essere combinate tra loro come tipologia
ESEMPIO 1:
In questo esempio si combina vbCritical e vbYesNo
Download Project
ESEMPIO 2:
In questo esempio si combina vbInformation e vbRetryCancel
Download Project
Vedi anche visualizzazione MsgBox
Vedi anche interazione con le MsgBox
PERSONALIZZAZIONE 1:
All'interno delle MsgBox è possibile visualizzare il testo su più righe utilizzando una serie di stringhe speciali:
- Chr(13) oppure vbCr - Ritorno a capo
- Chr(10) oppure vbLf - Nuova riga
Chr(10) & Chr(10)
oppure
Chr(13) & Chr(10)
ESEMPIO 1:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub bn_avviso_Click() | |
MsgBox "Riga 1 del messaggio" & Chr(13) & "Riga 2 del messaggio" & Chr(10) & Chr(10) & "Riga 3 del messaggio", vbInformation, "Titolo della finestra" | |
End Sub |
Download Project

PERSONALIZZAZIONE 2:
Le MsgBox possono essere combinate tra loro come tipologia
ESEMPIO 1:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub bn_avviso_Click() | |
MsgBox "Riga del messaggio", vbCritical + vbYesNo, "Titolo della finestra" | |
End Sub |
Download Project

ESEMPIO 2:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub bn_avviso_Click() | |
MsgBox "Riga del messaggio", vbInformation + vbRetryCancel, "Titolo della finestra" | |
End Sub |
Download Project

Vedi anche visualizzazione MsgBox
Vedi anche interazione con le MsgBox
Commenti
Posta un commento