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 Longprivate Const Srcopy = & HCC0020PRIVATE WITHEVENTS PIC1 AS PICTUREBOX
Sub form_load () Me.Move 0, 0, 11000, 8500SET PIC1 = Controls.add ("Vb.PictureBox", "Pic1", Me) with pic1.visible = true.move 3600, 2700, 3600, 2700.scalemode = 3.Appearance = 0.backcolor = me.backcolor.currentx = 0.currenty = 0.FontSize = 60.ForeColor = vblue.fontname = "书" End Withend Sub
Sub form_click () DIM W AS INTEGER, H AS INTEGERPIC1.PRINT "The beginning of" & VBCRLF & "Sexy" W = Pic1.scaleWidthh = Pic1.scaleHeightstretchblt Me.HDC, W, H, -W, H, PIC1. HDC, 0, 0, W, H, Srccopystretchblt Me.hdc, 3 * W, H, -W, H, PIC1.HDC, 0, 0, W, H, Srcopystretchblt Me.HDC, W, H, W, - H, PIC1.HDC, 0, 0, W, H, Srcopystretchblt me.hdc, w, 3 * h, w, -h, pic1.hdc, 0, 0, w, h, srccopyend Sub
The effect is as follows: