|
-
Jul 30th, 2001, 04:31 PM
#1
Thread Starter
Lively Member
Popup Menu
When I right click I need a popup menu, which has Copy, and paste. But I would disable Paste before I push copy button. Can someone help me a API fuction which can disable Paste menu.
Thanks very much
-
Jul 30th, 2001, 05:45 PM
#2
Before displaying your menu do a check to see if any data of a specific format is available on the Clipboard and use the result to determine whether the Paste option should be enabled, i.e.
VB Code:
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
mnuPaste.Enabled = Clipboard.GetFormat(vbCFText)
PopupMenu mnuPopup
End If
End Sub
-
Jul 31st, 2001, 11:23 AM
#3
Thread Starter
Lively Member
Thanks, but it is not the answer. The popup menu will be something I create by Private Declare Function CreatePopupMenu Lib "user32" () As Long. I will two option Copy and Paste to this popup menu. But I would disable paste.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|