Looking for lightweight Textbox control that does not hog up right mouse click 
Author Message
 Looking for lightweight Textbox control that does not hog up right mouse click
I want to be able to pop up a small menu when a user right clicks any
of the text boxes on a form.  The text boxes are all members of a
control array.  The standard VB textbox pops up an edit popup when
right-clicked, which interferes with any popup you might want to show.

Subclassing is not an option for a control array, so that approach is
out.  I tried using Richtext boxes, but they do not have a ForeColor
property (at least in VB5 Pro), despite the fact that VB5 help says
they do.  Not to mention the fact that they are hulking monsters that
make my app load about 10 times slower.  I need to be able to
programmatically set ForeColor, so the Rich textbox is out.  I suppose
I could kludge something up with label controls or masked edits, but
that would look crappy and involve too much hacked-up code to get it
to work.

Does anyone make just a simple, editable textbox ocx for VB that does
not have a built-in edit popup and has all the same properties and
methods as the standard VB textbox?

jdm

remove anti-spam tag from email address to reply by email



Fri, 12 Apr 2002 03:00:00 GMT  
 Looking for lightweight Textbox control that does not hog up right mouse click

Quote:
> You can try the attached project.... It uses subclassing and a

control array of textboxes.

Quote:
> It's a slight modification from VBnets sample

Thanks.  I'll give it a shot.

jdm



Sat, 13 Apr 2002 03:00:00 GMT  
 Looking for lightweight Textbox control that does not hog up right mouse click
There is always the enabled/disabled hack that actually works quite well ...

   Text1(1).Enabled = False
   Text1(1).Enabled = True
   PopupMenu yourMenu

--

Randy Birch, MVP Visual Basic

http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please correspond only using the newsgroups so all can benefit.


| I want to be able to pop up a small menu when a user right clicks any
| of the text boxes on a form.  The text boxes are all members of a
| control array.  The standard VB textbox pops up an edit popup when
| right-clicked, which interferes with any popup you might want to show.
|
| Subclassing is not an option for a control array, so that approach is
| out.  I tried using Richtext boxes, but they do not have a ForeColor
| property (at least in VB5 Pro), despite the fact that VB5 help says
| they do.  Not to mention the fact that they are hulking monsters that
| make my app load about 10 times slower.  I need to be able to
| programmatically set ForeColor, so the Rich textbox is out.  I suppose
| I could kludge something up with label controls or masked edits, but
| that would look crappy and involve too much hacked-up code to get it
| to work.
|
| Does anyone make just a simple, editable textbox ocx for VB that does
| not have a built-in edit popup and has all the same properties and
| methods as the standard VB textbox?
|
| jdm
|
| remove anti-spam tag from email address to reply by email
|
|



Fri, 10 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to remove textbox right mouse click menu?

2. Disabling right mouse click in standard textbox

3. Textbox - disable right mouse click

4. How to remove textbox right mouse click menu?

5. override right mouse click on textbox

6. How to remove textbox right mouse click menu?

7. How to prevent menu with right mouse click on textbox

8. Disable mouse right click of TextBox

9. label click event only works with right mouse click

10. How to include an ordinairy mouse-click in a right-click

11. Right-click same as left-click in textbox

12. Catching right mouse click on VB controls

 

 
Powered by phpBB® Forum Software