Bitmap mit untergeordnetem Bitmap als Hintergrund Verfasst am: 30.07.2010, 16:18
Hallo,
ich habe einen Ordner idem die Vb datei drinne ist. In dem Unterordner ist auch der Ordner "Pokegranitpics". So da woauch die vb datei ist befidet sich welt.txt
In der welt.txt sind x ,y posistionen von Bilder eingetragen. Bei den bilder handelt es sich um sprites aus denen das weiß raus gemacht werden soll und gegen hintergrund (grün) ersetz werden soll. Hir mein bisheriger Code:
Form1:
Private Declare Function BitBlt Lib "gdi32.dll" ( _
ByVal hdcDest As Long, _
ByVal nXDest As Long, _
ByVal nYDest As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hdcSrc As Long, _
ByVal nXSrc As Long, _
ByVal nYSrc As Long, _
ByVal dwRop As Long) As Long
' Nur zum Testen, wird dann nicht mehr benötigt
' Kopiert den Inhalt eines Bildfeldes in ein anderes,
' wobei die Farben invertiert werden
Private Sub Command1_Click()
Dim Retval As Long
Declare Function BitBlt Lib "gdi32.dll" (ByVal _
hdcDest As Long, ByVal _
nXDest As Long, ByVal _
nYDest As Long, ByVal _
nWidth As Long, ByVal _
nHeight As Long, ByVal _
hdcSrc As Long, ByVal _
nXSrc As Long, ByVal _
nYSrc As Long, ByVal _
dwRop As Long) As Long
Global Const BLACKNESS = &H42
Global Const DSTINVERT = &H550009
Global Const MERGECOPY = &HC000CA
Global Const MERGEPAINT = &HBB0226
Global Const NOTSRCCOPY = &H330008
Global Const NOTSRCERASE = &H1100A6
Global Const PATCOPY = &HF00021
Global Const PATINVERT = &H5A0049
Global Const PATPAINT = &HFB0A09
Global Const SRCCOPY = &HCC0020
Global Const SRCAND = &H8800C6
Global Const SRCERASE = &H440328
Global Const SRCINVERT = &H660046
Global Const SRCPAINT = &HEE0086
Global Const WHITENESS = &HFF0062
Sub ladewelt()
'Welt laden und anzeigen
Open App.Path + "\Welt.txt" For Input As #1
While Not EOF(1)
Line Input #1, a$
If Trim$(a$) = "" Then GoTo finish
pos% = InStr(a$, ";")
FileName$ = Left(a$, pos% - 1)
a$ = Mid$(a$, pos% + 1)
'_
pos% = InStr(a$, ";")
Was$ = Left(a$, pos% - 1)
a$ = Mid$(a$, pos% + 1)
'_
Mehr: