![]() |
| Register | Login | |||||
|
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
|
| | |||
| 0 user currently in Programming. | 3 guests |
| Acmlm's Board - I2 Archive - Programming - VB Transparent Bitmaps... |
| | ![]() |
| Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
| User | Post | ||
|
Mega-Dog Level: 20 Posts: 107/139 EXP: 40051 For next: 2388 Since: 03-15-04 From: Minnesota Since last post: 8 days Last activity: 4 days |
| ||
| Hey I have recently been trying to make a bitmap transparent...via setting the menu color in so I can have Menu Bitmaps in VB. Only problem is I have not found any good code. I am wondering if someone has a demo of some code they can share with me to render these Bitmaps fast. I have tried stuff like this but it dithers and screws up the colors: PicBmp (image is a GIF with Transparency) picBmp.BackColor = GetSysColor(4) 'Set Color to Windows Menu System Color picBmp.Picture = picBmp.Image any suggestions? |
|||
|
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 7389/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
| LoadImage might do the trick. If you use the LR_LOADTRANSPARENT flag, the top left pixel defines a transparent colour. Any instance of that colour in the image is replaced with the default window colour. It only works with 256-colour images, but GIFs are 256 colours anyway. (I'm pretty sure it can load a GIF/JPG/PNG.) | |||
knuck![]() Hinox Banned until 19-58-5815: trolling, flaming, spamming, being a general fucktard... Level: 62 Posts: 1604/1818 EXP: 1894574 For next: 90112 Since: 03-15-04 Since last post: 14 hours Last activity: 9 hours |
| ||
| PictureBox doesn't support PNG. | |||
|
Mega-Dog Level: 20 Posts: 109/139 EXP: 40051 For next: 2388 Since: 03-15-04 From: Minnesota Since last post: 8 days Last activity: 4 days |
| ||
| no PNG no LoadImage... Has to be a Bitmap...nothing else... |
|||
|
sloat Level: 16 Posts: 84/85 EXP: 18044 For next: 2212 Since: 05-21-04 From: South Central Delaware Since last post: 19 days Last activity: 5 hours |
| ||
| Try finding info on TransparentBlt for vb. That will copy a memory bitmap to a DC (if the picbox has a DC property) and mask out a given color as transparent. Just do not use it on Windows 98. There is a known memory leak, and it will really screw stuff up. |
| Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
| Acmlm's Board - I2 Archive - Programming - VB Transparent Bitmaps... |
| | ![]() |
