close

右鍵選單元件 ContextMenuStrip

參考自
http://tw.myblog.yahoo.com/teddybear-13/article?mid=226&next=203&l=f&fid=11



以下為vb2008 簡單示範 可用ok
//===================================================
Public Class Form1



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Me.PictureBox1.ContextMenuStrip = ContextMenuStrip1

Me.ContextMenuStrip = ContextMenuStrip1

End Sub

Private Sub AToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AToolStripMenuItem1.Click
MsgBox("a1")
End Sub

Private Sub A2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles A2ToolStripMenuItem.Click
MsgBox("a2")
End Sub
End Class

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 prague12 的頭像
    prague12

    prague12

    prague12 發表在 痞客邦 留言(0) 人氣()