b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

bitblt_bitblt srccopy_bitblt 拉伸

电脑杂谈  发布时间:2017-02-12 05:04:10  来源:网络整理

bitblt srccopy_bitblt_bitblt 拉伸

bitbltbitblt

Contantes y Apis

-------------------

Public Const SRCCOPY As Integer = &HCC0020

Public Const SRCINVERT As Integer = &H660046

Public Const SRCAND As Integer = &H8800C6

...

Declare Auto Function BitBlt Lib "GDI32.DLL" ( _

ByVal hdcDest As IntPtr, _

ByVal nXDest As Integer, _

ByVal nYDest As Integer, _

ByVal nWidth As Integer, _

ByVal nHeight As Integer, _

ByVal hdcSrc As IntPtr, _

ByVal nXSrc As Integer, _

ByVal nYSrc As Integer, _

ByVal dwRop As Int32) As Boolean

Function

-------------------

Public Sub BitBlt2(ByRef Destino As PictureBox, ByVal dX As Integer, ByVal dY As Integer, ByVal dW As Integer, ByVal dH As Integer, ByVal Origen As PictureBox, ByVal sX As Integer, ByVal sY As Integer, ByVal Flag As Integer)

Dim srcPic As Graphics = Destino.CreateGraphics'Get a Graphics Object from the form

Dim orgPic As Graphics = Origen.CreateGraphics'Get a Graphics Object from the to

Dim srcBmp As New Bitmap(src.Width, src.Height, srcPic) 'Create a EMPTY bitmap from that graphics

Dim srcMem As Graphics = Graphics.FromImage(srcBmp)'Create a Graphics object in memory from that bitmap

Dim HDC1 As IntPtr = orgPic.GetHdc'get the IntPtr's of the graphics

Dim HDC2 As IntPtr = srcMem.GetHdc'get the IntPtr's of the graphics

'Set the picture

BitBlt(HDC2, dX, dY, dW, dH, HDC1, sX, sY, Flag)

'Clone the bitmap so we can dispose this one

If Not Destino.Image Is Nothing Then Destino.Image.Dispose()

Destino.Image = srcBmp.Clone

'Clean Up

orgPic.ReleaseHdc(HDC1)

orgPic.Dispose()


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-31928-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...