Original Post
Ok... I have searched a found ALOT of posts on this subject and every single one has something wrong with it. Currently I'm not interested in making it work on all computers, right now i'll be happy to make it work on my computer. That said, if you need any specific specs of my computer PLZ ask. ATI Radeon 8500LE (newest drivers) Windows XP SP1 (+ all applicable updates) YES I am using VB .net, and I know how evil that is to some of you people, but I can really use some help. YES I already know that DirectDraw does NOT do Translucency in any conventional manner, but I do not want translucency. I want transparency. Here is what I have. Now I load a picture called "stand.bmp" which is basically a pink (thats R 255 G 0 B 255) box with a white (R 255 G 255 B 255) 'S' in it. The funny thing is for some reason it makes the 'S' transparent while leaving me with the pink. Aside from making a new fad in strangely-colored RPG maps, does anyone have ANY suggestions. [Edited by - FenixRoA on July 13, 2004 9:30:23 PM]
Dim Point As Drawing.Point
Dim Pict As DirectX.DirectDraw.Surface
Public Sub New(ByVal x As Int32, ByVal y As Int32, ByVal nPict As Drawing.Bitmap, ByRef DDevice As DirectX.DirectDraw.Device)
Dim Desc As New DirectX.DirectDraw.SurfaceDescription()
Dim CK As New DirectX.DirectDraw.ColorKey()
CK.ColorSpaceLowValue = RGB(·po·255·pc·, ·po·0·pc·, ·po·255·pc·)
CK.ColorSpaceHighValue = RGB(·po·255·pc·, ·po·0·pc·, ·po·255·pc·)
Desc.SurfaceCaps.VideoMemory = True
Desc.SurfaceCaps.OffScreenPlain = True
Desc.SourceDraw = CK
Desc.Height = nPict.Height
Desc.Width = nPict.Width
Point = New Drawing.Point(x, y)
Pict = New DirectX.DirectDraw.Surface(nPict, Desc, DDevice)
'63519 '565
'Pict.SetColorKey(DirectX.DirectDraw.ColorKeyFlags.SourceDraw, CK)
End Sub
Public Sub DrawScreen(ByVal ScrTop As Int32, ByVal ScrLeft As Int32, ByRef DXSight As DirectX.DirectDraw.Surface)
Dim SrcRect As New Drawing.Rectangle()
Dim DestRect As New Drawing.Rectangle()
SrcRect.Width = Pict.SurfaceDescription.Width
SrcRect.Height = Pict.SurfaceDescription.Height
DestRect.Width = Pict.SurfaceDescription.Width
DestRect.Height = Pict.SurfaceDescription.Height
DXSight.DrawFast(DestRect.X, DestRect.Y, Pict, SrcRect, DirectX.DirectDraw.DrawFastFlags.SourceColorKey Or DirectX.DirectDraw.DrawFastFlags.Wait)
End Sub