I'm sure it's not possible from what I know, but here goes...
I know how to blit a mask, then blit a graphic onto it to make it transparent, but how can I do this and store it in memory, retaining the transparency? I'm trying to just blit it once with transparency, then just pull it from memory whenever I need it. Possible? If so, can you give me a little push into the right direction? Thanks.
You might be able to do something similar to this. I'm assuming you're using normal Bitblt to do your transparent blts. Well, this involves two separate blts if I remember correctly. I can't remember the operator names (vbscrpaint/vbsrccopy) but couldn't you do one and put that in memory and then grab it when you need to do the second blt later? That way you can do one blt a head of time and save yourself from blting twice, who knows how many times, later?
this will create your image and load it into a back buffer the size of your image, just use BitBlt to blit the back buffer (hdcBuffer is the variable name) to anywhere on the form. to blit to a picture box, change the form1.hdc to picture1.hdc in the CreateCompatibleBitmap function call. here is the example to blit the picture to the top left of the form
Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Public Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Public Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Public Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Public Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Public Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
Ok, I did it exactly as you said, and it works, except for one thing... it causes horrible graphic glitches in the transparent area of the buffer when copied onto the main form's DC. Is it fixable? I've tried for a while messing around with it, but I can't figure anything out. Any ideas?