Results 1 to 4 of 4

Thread: What am I doing Wrong?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    93

    What am I doing Wrong?

    I am trying to use the StrechBlt Function, but nothing happens.
    Code:
    Option Explicit
    Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
    
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    
    Private Sub Form_Load()
        picPreviewFront.Picture = frmMain.imgFront.Picture
        StretchBlt picPreviewFront.hdc, 12288, 7380, ScaleWidth, ScaleHeight, frmPreviewFront.hdc, 12288, 7380, picPreviewFront.ScaleWidth, picPreviewFront.ScaleHeight, vbSrcCopy
       End Sub
    
    Private Sub mnuFileRefresh_Click()
        Refresh
    End Sub
    Last edited by LBS; Feb 22nd, 2002 at 07:12 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    93
    The reason the BitBlt function is in there is because I am using it for my printing code, which I did not put in there.

  3. #3
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    Numero Uno (means number one):

    I hate the Windows GDI functions. Strange enough, Windows was not designed for graphics!


    Numero Dos (means number.... oh, you get it, do you?)

    I have had a ***** with that StretchBlt .. I do not have the code at hand at the time of writing, but if you want a working example, I'll send you the code in a few days.

    I need to get access to another machine to do so.

    Something tells me, though, that you have to fiddle with the AutoRedraw properties.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    93
    I'd appreciate it if you sent me the working example. ty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width