srcPic.Dispose()
srcMem.ReleaseHdc(HDC2)
srcMem.Dispose()
srcBmp.Dispose()
End Sub
Codigo a insertar (From, Control, class..)
-----------------------------------------------
Dest = Picturebox a recibir el dibujo.
Src = Picturbox con imagen.
Mask 0 Picturebox con imagen.
BitBlt2(dest, 0, 0, 47, 47, Src, 0, 0, SRCAND)
BitBlt2(dest, 0, 0, 47, 47, Mask, 0, 0, SRCINVERT)
Gracias a Matthew Hazlett.
hello,

I have a image in picturebox, and the other image in the background of the picturebox.
the background image is the same image which is in picturebox1.image but it is coloured with block of dark colors for each parts.
now if i click on the picture box , i have given the code to retrive the color (ARGB) of background image where i clicked and then i have to colour the foreground image with the selected color from palette ,
but its coloring the background itself
...
i am using this code...
for coloring
Private Sub DoFill(ByVal sender As Object, ByVal ea As EventArgs)
' translate point to client co-ordinates
Dim pt As Point = m_pb.PointToClient(Control.MousePosition)
Dim x As Integer = pt.X
Dim y As Integer = pt.Y
Dim hDC1, hDC, hBrush As IntPtr
Dim g As Graphics = m_pb.CreateGraphics()
' get color of pixel clicked on
Dim clr As Color = CType(m_pb.BackgroundImage, Bitmap).GetPixel(x, y)
Dim cl As Color = CType(m_pb.Image, Bitmap).GetPixel(x, y)
Dim gdi_clr As Color = Color.FromArgb(0, clr.B, clr.G, clr.R)
Dim gdi_cl As Color = Color.FromArgb(0, cl.B, cl.G, cl.R)
Try
' get our device context
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-31928-2.html
但对有损我国主权的行为
臭猴子
恭喜杨洋代言的爱奇艺和索尼都有获奖哦