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
Printable View
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
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
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.