|
-
November 24th, 1999, 05:24 PM
#1
Can we Create user shaped tooltips in VB
Normally we have a rectangle shape to display a tooltip text in vb. Can we create our own shape like we have in Lotus Notes where u get ballon tooltips.
Is it possible by some way to simulate this.
Sandra
-
November 24th, 1999, 05:32 PM
#2
Re: Can we Create user shaped tooltips in VB
Yes you can. There are third party OCXs that do the job, or you can do it the hard way... making another form and shaping it to look like your tooltip using SetWindowRgn API. Normally it is hidden but it is displayed when the user moves the mouse over a certain control.
psiclone
-
November 24th, 1999, 05:35 PM
#3
Re: Can we Create user shaped tooltips in VB
Do u have any idea about what are the third party OCX's available which can solve my purpose.
-
November 24th, 1999, 05:45 PM
#4
Re: Can we Create user shaped tooltips in VB
Sorry, I'm afraid I use the second method more. I can suggest a VBX for VB3 though - DBTTip.vbx, I don't know if a newer version is available as an OCX for VB5/6.
Search for "OCX","tooltip" and "shape" at the major search engines. You're bound to find something. Or if you know someone who is a VB expert or a good C programmer, you could get them to write one for you... It's not that hard, honest!
psiclone
-
November 25th, 1999, 06:29 AM
#5
Re: Can we Create user shaped tooltips in VB
Just an idea... i dont know how far this is feasible..
If you can get the handle of the too-tip window ( which is after all a window), you can set its window region to non-rect region,and it should show in that shape, next time on!, unless somewhere inside he is correcting the shape back ( which i dont think so).
So abt how to get the tool tip text window handle: one possible ( not so clear/n ) route: before the tool tip is shown, every parent window (ie the control for which it is going to show the tip) recieves a TTN_SHOW message, and this message will have a hWndfrom parameter which will be toop-tip window's handle. You can catch this, and try. and BEST OF LUCK :-) save your work every often..
RK
-
November 25th, 1999, 06:32 AM
#6
Re: Can we Create user shaped tooltips in VB
Ravi & Others...
you might be able to use some of the code from http://codeguru.developer.com/vb/articles/1944.shtml to get and modify the tooltip window.
This sample show's how to have a true multi-line tooltip control, so once you have the handle, in theory Ravi's idea should work.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
November 25th, 1999, 06:53 AM
#7
Re: Can we Create user shaped tooltips in VB
Ah hooooo....
IT WORKS !:-)
Just add 2 lines to the code in that article, in the class initialise, after creating the window:
m_Elrgn = CreateEllipticRgn(0, 0, 100, 100)
If m_Elrgn <> 0 then
SetWindowRgn m_hwndTT, m_Elrgn, false
End If
with their defs pickedup from API viewer
and it works.. shows an elliptic tool tip. i guess now we can make any kind of region to work with
RK
-
November 25th, 1999, 07:00 AM
#8
Re: Can we Create user shaped tooltips in VB
correction:
1. Not in Class_initialise but in Create function.
Public Function Create(frm As Form) As Boolean
2. You need to do the cleaning up of stuff also
3. To get a better look more need to be done to adjust the size as per the case.
That was just a little euphoria.. i am off for the day. bye
RK
-
December 8th, 1999, 02:32 AM
#9
Re: Can we Create user shaped tooltips: New Article Added
Yes it is possible, and no need for 3rd party controls.:-)
---
Based on Bred Martinez Code pointed by Chris (look at the complete thread), I expanded the idea and we have added a new page to Code Guru site on this.
To know what you get, take a look at:
http://www.codeguru.com/vb/articles/1967.shtml
Many thanks to Chris Eastwood for his help.
Ravi Kiran
RK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|