Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Disable EFFECT of Right Click Popup Menu
Author:
Nikunj Bhatt
E-mail:
Click to e-mail author
Website:
http://nikunjbhatt.blogspot.com
Submitted:
8/5/2008
Version:
VB6
Compatibility:
VB6
Category:
Controls
Views:
9347
This a method of disabling the EFFECT of right click popup menu, for mainly Textbox like controls. My earlier method was by using a timer control which actually disables the right click menu for a subtle time. Now this is by using a Label and this just disables the effect of the popup menu. You will need to create a Label. Change its all properties according to the Textbox. Particularly, BackColor, BorderStyle, Height, Top, Width, Left. Means make the lable look same as the textbox.
Declarations:
'none
Code:
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Text1 = Label1 Text1.Visible = True Text1.SetFocus End Sub Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then Text1.Visible = False Label1 = Text1 End If End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement