⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fbeiye.frm

📁 vb精彩编程希望大家有用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "页页窗效果"
   ClientHeight    =   6090
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6825
   LinkTopic       =   "Form1"
   ScaleHeight     =   6090
   ScaleWidth      =   6825
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   300
      Left            =   2880
      TabIndex        =   1
      Top             =   5520
      Width           =   800
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      Height          =   6060
      Left            =   0
      Picture         =   "Fbeiye.frx":0000
      ScaleHeight     =   400
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   450
      TabIndex        =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   6810
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'申明在指定的设备场景中设置一个像素的RGB值的函数Getpixel和GetPixel
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long) As Long
Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Dim scanlines As Integer
'退出按钮
Private Sub Command1_Click()
    Unload Me
End Sub
Private Sub Form_Load()
    Picture1.ScaleMode = 3
    'ScaleMade的属性值为3表示像素,监视器的最小分辨率
    Form1.ScaleMode = 3
    '设置图片的大小
    Picture1.Width = Form1.ScaleWidth
    Picture1.Height = Form1.ScaleHeight
End Sub
'延迟时间设置
Sub delay(delaytime As Long)
    For i = 1 To delaytime
        DoEvents
    Next i
End Sub
Private Sub Form_Paint()
    H% = Picture1.ScaleHeight
    W% = Picture1.ScaleWidth
    scanlines = 4
    '百叶效果中刷三次清晰成像
    For y = 0 To H% Step 3
        For x = 0 To W%
            a = GetPixel(Picture1.hdc, x, y) '按像素获得图片
            b = SetPixel(Me.hdc, x, y, a)
        Next x
    Next y
    delay 1000
    For y = 1 To H% Step 3
        For x = 0 To W%
            a = GetPixel(Picture1.hdc, x, y)
            b = SetPixel(Me.hdc, x, y, a)
        Next x
    Next y
    delay 1000
    For y = 2 To H% Step 3
        For x = 0 To W%
            a = GetPixel(Picture1.hdc, x, y)
            b = SetPixel(Me.hdc, x, y, a)
        Next x
    Next y
    delay 1000
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -