473,385 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to display a tooltip with transparent background.

// The below code simply creates a black rectangular area for the tooltip
// Did I need to do any pinvike stuff to make the background tranparent.
// What am I really tring to acheive is Opacity of say 10% for the tooltip, so I can see the data on the grid the tooltip is covering.

Expand|Select|Wrap|Line Numbers
  1. private void hoverTooltip_Draw(object sender, DrawToolTipEventArgs e)
  2. {    
  3.     SolidBrush sb = new SolidBrush(Color.Transparent);            
  4.     e.Graphics.FillRectangle( sb, e.Bounds );             
  5.     e.DrawBorder();
  6.     e.DrawText();                
  7. }
  8.  
  9.  
  10. private void BidGrid_MouseMove(object sender, MouseEventArgs e)
  11. {
  12. HoverToolTip.SetToolTip(sender, sb.ToString());
  13. }
Aug 6 '10 #1
0 1191

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Nathan Sokalski | last post by:
I am trying to make a transparent background using the Bitmap and Graphics classes by setting the alpha value. However, it looks like what is happening is that it is being painted on top of the...
8
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making...
4
by: Vincent | last post by:
Hi all, I would like to make a table or a div with a transparent background. The solution found does work only with FireFox using a png image. The second one works with IE and FireFox but make...
0
by: MLH | last post by:
My question is not how to paste images in Access with transparent backgrounds. I've researched 4-6 year old postings adequately describing how to achieve this. Lebans' site does a good job of...
0
by: rh | last post by:
Hi, I am using a ASP.NET 2.0 Menu control and would like the dynamic menu to have a transparent background so that whatever is behind it is partly visible between each dynamic menu item. I've...
3
by: Scott | last post by:
Is there a way to make a control have a transparent background? Like a text box. Thanks, Scott
2
by: Trond Michelsen | last post by:
Hi. I have a transparent PNG-image that I would like to display on top of the rest of the web page. I've already got this part working. But, I'd like the background (as in "the part of the image...
11
by: vbt | last post by:
I am having difficult time drawing a image using Visual Studio Image Editor. I can draw the image and save it as .bmp file load it into a pictureBox image but when the program is run the...
2
by: Niu Kun | last post by:
Dear all, I'm trying to draw many overlapped PNG files with transparent background in imagebox control. But the transparent background in this control is rendered as the main control's...
8
by: salmobytes | last post by:
Making thumbnail images isn't all that hard, for the most part. There is lots of shrink-wrapped code out there you can download and/or munge from. But nothing I've yet seen does the right thing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.