Transparent Pictures 
Author Message
 Transparent Pictures

In Visual Basic 3 there was an option to create transparent bitmaps thru
API-calls. When I converted this program to Visual Basic 5 and changed the
API-calls to their 32-bit equivalents the program didn't work anymore. Does
anybody know how to make transparent bitmaps in VB5 (Enterprise Edition)???




Thu, 24 Aug 2000 03:00:00 GMT  
 Transparent Pictures


Quote:
>In Visual Basic 3 there was an option to create transparent bitmaps thru
>API-calls. When I converted this program to Visual Basic 5 and changed the
>API-calls to their 32-bit equivalents the program didn't work anymore. Does
>anybody know how to make transparent bitmaps in VB5 (Enterprise Edition)???

Try the easy way.

Public Const ILD_TRANSPARENT = &H1

Public Declare Function ImageList_Draw Lib "comctl32.dll" (ByVal himl&,
ByVal index&, ByVal hDCDest&, ByVal X&, ByVal Y&, ByVal flags&) As Long

  Dim imgX As ListImage

  With ImageList1
    Set imgX = .ListImages.Add(, , picSource.Picture) 'or LoadPicture
    .MaskColor = vbBlack 'or whatever
  End With

  Dim lret As Long

  lret = ImageList_Draw(ImageList1.hImageList, 0, _
                         picDest.hDC, X, Y, ILD_TRANSPARENT)

--
Richard Mason



Fri, 25 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Transparent Picture Box

2. Transparent Picture

3. How to insert a transparent picture into a ListView

4. Print transparent picture to Printer

5. How to have a transparent picture on top of other controls

6. transparent pictures

7. transparent pictures in VB3

8. Mask used with transparent Picture Box question

9. Q:Transparent pictures (BMP).

10. Transparent picture box?

11. Transparent Picture Box ???

12. Transparent Pictures

 

 
Powered by phpBB® Forum Software