HACK, thank you , BUT >>>
OK Hack, I did it like you said :
VB Code:
Private Sub Text49_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbRightButton _
Then
LockWindowUpdate Text49.hwnd
Text49.Enabled = False
Me.PopupMenu FAddress
LockWindowUpdate 0&
Text49.Enabled = True
End If
End Sub
and it works fine, but what if my Text49 had the focus while right-clicking upon it ? I tried it and my textbox lost the focus. The focus was passed to the next control in the TabStop order. And I don't want that. Can't it be done without disabling the textbox somehow ?
TIA
subclassing is the answer
ok everybody, I found an ellegant solution to my problem. For NE1 interested, this is a good link :
Subclass textboxes to display custom popups menus
Cheers