Mirroring of strings using API (1)

xiaoxiao2021-03-06  53

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 PictureBoxPrivate Withevents PIC2 As PictureBox

Sub form_load () Me.Move 0, 0, 10200, 4000SET PIC1 = Controls.Add ("Vb.PictureBox", "PIC1", Me) Pic1.visible = truePic1.move 0, 0, 5000, 2500Set Pic2 = Controls. Add ("vb.picturebox", "pic2", me) pic2.visible = truePic2.move 5000, 0, 5000, 2500PIC1.Scalemode = 3PIC2.SCALEMODE = 3END SUB

Sub Form_Click () pic2.CurrentX = 0pic2.CurrentY = 0pic2.FontSize = 120pic2.ForeColor = vbRedpic2.FontName = "official script" pic2.Print "mirror" StretchBlt pic1.hdc, pic2.ScaleWidth, 0, -pic2.ScaleWidth, pic2 .Scaleheight, pic2.hdc, 0, 0, pic2.scalewidth, pic2.scaleheight, SrccopyEnd Sub

转载请注明原文地址:https://www.9cbs.com/read-116237.html

New Post(0)