VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Since I was having a hard time figuring out how to tile pictures in picture boxes and this site onl

by Piro (1 Submission)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 25th November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Since I was having a hard time figuring out how to tile pictures in picture boxes and this site only has one p.o.s. example of it I thought I

API Declarations



Public 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

Public Const SRCCOPY = &HCC0020

Rate Since I was having a hard time figuring out how to tile pictures in picture boxes and this site onl




  Dim ImgX
  Dim MaxX
  Dim NxtX
  ImgX = 0
  MaxX = PicBox.ScaleWidth

  Do Until ImgX >= MaxX
    If ImgX < MaxX Then
    Call BitBlt(PicBox.hdc, ImgX, 0, CoorW, CoorH, picMap.hdc, XPOS, YPOS, SRCCOPY)
    ImgX = ImgX + CoorW
    PicBox.Refresh
    End If
  Loop

End Sub

Public Sub TileVer(PicBox As PictureBox, CoorW As String, CoorH As String, picMap As PictureBox, XPOS As String, YPOS As String)

  Dim ImgY
  Dim MaxY
  Dim NxtY
  ImgY = 0
  MaxY = PicBox.ScaleHeight

  Do Until ImgY >= MaxY
    If ImgY < MaxY Then
    Call BitBlt(PicBox.hdc, 0, ImgY, CoorW, CoorH, picMap.hdc, XPOS, YPOS, SRCCOPY)
    ImgY = ImgY + CoorH
    PicBox.Refresh
    End If
  Loop

End Sub

Download this snippet    Add to My Saved Code

Since I was having a hard time figuring out how to tile pictures in picture boxes and this site onl Comments

No comments have been posted about Since I was having a hard time figuring out how to tile pictures in picture boxes and this site onl. Why not be the first to post a comment about Since I was having a hard time figuring out how to tile pictures in picture boxes and this site onl.

Post your comment

Subject:
Message:
0/1000 characters