menu.AddItem "sep3", LoadPicture(), "", MIT_SEPARATOR
menu.AddItem "check", LoadPicture("images\check.ico"), "一个 CheckBox", MIT_CHECKBOX
menu.AddItem "exit", LoadPicture("images\exit.ico"), "退出", MIT_STRING
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'''' 单击鼠标右建弹出菜单
If Button = vbRightButton Then
Dim pos As POINTAPI
GetCursorPos pos
menu.PopupMenu pos.X, pos.Y, POPUP_LEFTALIGN Or POPUP_TOPALIGN
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'''' 释放资源, 卸载窗体
Set menu = Nothing
Dim frm As Form
For Each frm In Forms
Unload frm
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




