javascript 代码 百叶窗实现 有错误 怎么改 50
1个回答
2016-05-29 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
Private Declare Function bitblt Lib "gdi32" Alias "BitBlt" (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 Const xtimes = 20 Const COPY_PUT = &HCC0020 Public hMemDc As Long, tt As Long, i%, j% Private Sub Form_Load() Me.ScaleMode = 3 Picture1.ScaleMode = 3 Picture1.Width = Me.Width \ 15 Picture1.Height = Me.Height \ 15 Picture1.Left = Screen.Width Picture1.AutoRedraw = True Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2 Command1.Caption = "纵向" Command2.Caption = "横向" Command3.Caption = "交错" End Sub 上面代码,请将Picture1装载一张图片 Private Sub Command1_Click() Me.Cls '纵向百叶效果 For i = 0 To (xtimes - 1) For j = i To Picture1.Width Step xtimes Call bitblt(Me.hDC, j, 0, 1, Picture1.Height, Picture1.hDC, j, 0, COPY_PUT) tmdly 1 Next j Next i End Sub Private Sub Command2_Click() Me.Cls '横向百叶效果 For i = 0 To (xtimes - 1) For j = i To Picture1.Height Step xtimes Call bitblt(Me.hDC, 0, j, Picture1.Width, 1, Picture1.hDC, 0, j, COPY_PUT) tmdly 1 Next j Next i End Sub Private Sub Command3_Click() Me.Cls '纵向与横向同步百页窗效果 For i = 0 To xtimes - 1 For j = i To Picture1.Width Step xtimes If j <= Picture1.Height Then Call bitblt(Me.hDC, 0, j, Picture1.Width, 1, Picture1.hDC, 0, j, COPY_PUT) End If Call bitblt(Me.hDC, j, 0, 1, Picture1.Height, Picture1.hDC, j, 0, COPY_PUT) tmdly 1 Next j Next i End Sub Public Sub tmdly(delaycycle As Single) tt = 0 Do While tt < 6000 * delaycycle tt = tt + 1 Loop End Sub(转)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询