get the text under the mouse pointer

2019-08-10 16:41发布

问题:

i am relatively new to C#. can anybody please tell me how to display the tool tip on the text editor...just as VS intellisense expands a particular method when we move the mouse over it??? Since i am Developing an adding i want the tool tip to be displayed on document (there is no form associated with it) how to get the text under the mouse pointer thanx in advance

回答1:

Off the top of my head look at the ToolTip class. I am sure you need to supply it with the x,y coordinates of where you want it to be displayed. So you just need to get the x,y coordinates of the mouse which should be simple enough.