Ini adalah lanjutan dari Pop Up dengan VB. Silahkan CoPas Code dibawah ini:
Option Explicit
Private Sub lblTestText_MouseDown(Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
If Button = vbRightButton Then
PopupMenu mnuPopUpFormat, vbPopupMenuRightButton
End If
End Sub
Private Sub mnuBold_Click()
If mnuBold.Checked Then
lblTestText.FontBold = False
mnuBold.Checked = False
Else
lblTestText.FontBold = True
mnuBold.Checked = True
End If
End Sub
Private Sub mnuItalic_Click()
If mnuItalic.Checked Then
lblTestText.FontItalic = False
mnuItalic.Checked = False
Else
lblTestText.FontItalic = True
mnuItalic.Checked = True
End If
End Sub
Private Sub mnuUnderline_Click()
If mnuUnderline.Checked Then
lblTestText.FontUnderline = False
mnuUnderline.Checked = False
Else
lblTestText.FontUnderline = True
mnuUnderline.Checked = True
End If
End Sub
Private Sub lblTestText_MouseDown(Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
If Button = vbRightButton Then
PopupMenu mnuPopUpFormat, vbPopupMenuRightButton
End If
End Sub
Private Sub mnuBold_Click()
If mnuBold.Checked Then
lblTestText.FontBold = False
mnuBold.Checked = False
Else
lblTestText.FontBold = True
mnuBold.Checked = True
End If
End Sub
Private Sub mnuItalic_Click()
If mnuItalic.Checked Then
lblTestText.FontItalic = False
mnuItalic.Checked = False
Else
lblTestText.FontItalic = True
mnuItalic.Checked = True
End If
End Sub
Private Sub mnuUnderline_Click()
If mnuUnderline.Checked Then
lblTestText.FontUnderline = False
mnuUnderline.Checked = False
Else
lblTestText.FontUnderline = True
mnuUnderline.Checked = True
End If
End Sub
Bagi kalian yang ingin mendownloadnya, bisa langsung mengklik link dibawah ini
http://www.indowebster.com/popupdemo.html
Kalau kalian suka dengan artikel ini, like dengan FB. Jika kalian masih kurang mengerti, silahkan bertanya dicomment postingan ini. Program ini dibuat dengan Visual Basic di www.tutorial-vb.com