Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!!!

Status
Not open for further replies.

dt114

Programmer
Dec 10, 2003
4
0
0
US
How can insert my own menu items into the standard Textbox Contextmenu? I want to use all the "Copy", "Paste", "Cut" functions from the standard Textbox Contextmenu, but I also want to have some other functions in the Contextmenu written by myself. I use VB.net. Please help me.
 
go to the toolbox and double click contextmenu.
at the top of the program you will see contextmenu in blue
(just as if you were adding a mainmenu)
create your context menu (copy paste and whatever else you want)
go to the properties window for the textbox you want.
in the contextmenu click the down arrow and you should see the new contextmenu that you added. choose it.
that should do it.
hope this helps.
 
Michelle, that does not really answer the question asked ... the "Default" context menu for a textbox is handled by windows, not VB. when you add your own it replaces the windows version, and you have to add all the functionality yourself. At present I know of know way to 'keep' the 'default' menu.



Becca

Somtimes, the easy answer is the hardest to find. :)
 
There is no way to keep the default menu and add items to it. You would need to create a context menu and add Copy Paste etc... to it.

I think I have some code somewhere to do this if you need it.



DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
DotNetDot,
Please send me the code if you can find it. My e-mail address is dt@adem.state.al.us

Thank you very much!

DT114
 
Has anyone heard of a book that compares Visual Basic to AS400/RPG? As a long time RPG Programmer, I am really struggling with some of the Visual Basic concepts? I found a book called "C for the RPG Programmer" but haven't been able to find anything for Visual Basic. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top