Code center > Darwinbots Program Source Code
Picturebox load
Zelos:
is it possible in vb to mirror a picture so the sides changes?
Zelos:
the array thing have ive solved, what about mirrir effect?
PurpleYouko:
Not quite sure what you mean. Can you explain a little?
Zelos:
just a effect that makes the mirror effect of a pic, left becomes right and right becomes left
--- Code: ---Private Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Const sp_width = 8
Const sp_height = 5
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim p(1 To 2) As StdPicture
Set p(2) = LoadPicture("C:\Documents and Settings\Pelle\Mina dokument\RPG\General Items\Bottle Liquids\Blod.gif")
x = Form1.width / 2
y = Form1.height / 2
'BitBlt Form1.hDC, x, y, sp_width, sp_height, Image1.Picture, 0, 5, vbSrcAnd
'BitBlt Form1.hDC, x, y, sp_width, sp_height, Image1.Picture, 0, 0, vbSrcPaint
BitBlt Form1.hDC, x, y, sp_width, sp_height, p(2).hDC, 0, 0, vbSrcCopy
End Sub
--- End code ---
ive created this code, it just complain, why? can someone tells me what im doing wrong?
you migiht need to change the path of the file. here is the file anyhow
PurpleYouko:
Using BitBlt eh?
That is fairly advanced programming. Congratulations on getting this working at all. It took me ages to get BitBlt to work in any programs and I still don't fully understand all its capabilities.
I haven't ever tried to use a mirror effect so I can't really help you without researching it a little myself first.
Are you getting the main picture to work properly with the BitBlt function? What exactly happens that is not right?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version