How I load the image other types?

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: helmut, XnTriq, xnview

Post Reply
D-Off
Posts: 3
Joined: Fri May 18, 2007 1:59 pm
Contact:

How I load the image other types?

Post by D-Off »

How I load the image?
I have a code of the creation screenshot (VB.NET):

Code: Select all

Protected Sub CaptureScreen()
        Dim hSDC, hMDC As Integer
        Dim hBMP, hBMPOld As Integer
        Dim rC As Integer
        hSDC = CreateDC("DISPLAY", "", "", "")
        hMDC = CreateCompatibleDC(hSDC)

        FW = GetDeviceCaps(hSDC, 8)
        FH = GetDeviceCaps(hSDC, 10)
        hBMP = CreateCompatibleBitmap(hSDC, FW, FH)

        hBMPOld = SelectObject(hMDC, hBMP)
        rC = BitBlt(hMDC, 0, 0, FW, FH, hSDC, 0, 0, 13369376)
        hBMP = SelectObject(hMDC, hBMPOld)

        rC = DeleteDC(hSDC)
        rC = DeleteDC(hMDC)

        oBackground = Image.FromHbitmap(New IntPtr(hBMP))
        DeleteObject(hBMP)
    End Sub
As possible load in GflAx got hBMP, if oBackground has a type System.Draving.Bitmap, but it is need type stdole.IPicture? What convert System.Draving.Bitmap in stdole.IPicture?
Please, don't advise me to use other way of the creation a screenshot - I necessary to do screenshot without use Clipboard.
Best regards, user GflAx

I have found the decision! Thnx to all...
Post Reply