Menu vb
Upcoming SlideShare
Loading in...5
×
 

Menu vb

on

  • 1,512 views

 

Statistics

Views

Total Views
1,512
Views on SlideShare
1,406
Embed Views
106

Actions

Likes
0
Downloads
4
Comments
0

12 Embeds 106

http://visual-basic-adk.blogspot.in 61
http://visual-basic-adk.blogspot.com 20
http://visual-basic-adk.blogspot.com.br 9
http://visual-basic-adk.blogspot.kr 5
http://visual-basic-adk.blogspot.co.uk 4
http://visual-basic-adk.blogspot.mx 1
http://visual-basic-adk.blogspot.com.ar 1
http://visual-basic-adk.blogspot.sg 1
http://visual-basic-adk.blogspot.it 1
http://visual-basic-adk.blogspot.nl 1
http://visual-basic-adk.blogspot.cz 1
http://visual-basic-adk.blogspot.de 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Menu vb Menu vb Document Transcript

  • Code help for Menu, pop up menuIf Button = vbRightButton Then PopupMenu Me.mnuPopupPrivate txtName_MouseUp(Button As Integer, Shift As Integer, X As Single, Y AsSingle)If Button=vbRightButton ThenPopupMenu mnuEditEnd IfEnd SubHow do I find out what menu item was clickedstr = popMenu.NameSelect Case strCase "mCut"MsgBox "cut"Case "mPaste"MsgBox "paste"Case "mProperties"MsgBox "pro"End SelectPopup menu coding 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
  • Code for bold Private Sub mnuBold_Click() If mnuBold.Checked Then lblTestText.FontBold = False mnuBold.Checked = False Else lblTestText.FontBold = True mnuBold.Checked = True End If End SubCode the mnuItalic_Click and mnuUnderline_Click events in a similar fashion as shown below. 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 SubMsgBox "Code for Print goes here.", vbInformation, "Menu Demo" Private Sub mnuBold_Click() If mnuBold.Checked Then lblTestText.FontBold = False mnuBold.Checked = False
  • ElselblTestText.FontBold = TruemnuBold.Checked = TrueEnd IfEnd Sub