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

📄 form1.vb

📁 视频卡的测试程序
💻 VB
📖 第 1 页 / 共 2 页
字号:
Imports System.Drawing.Drawing2D
Imports System.Threading

Public Class form1
    Inherits System.Windows.Forms.Form

    Declare Function WaitForSingleObject Lib "kernel32" (ByVal lpHandles As Long, ByVal dwMilliseconds As Long) As Long
    Declare Function ResetEvent Lib "kernel32" (ByVal hEvent As Long) As Long

    Declare Auto Function BitBlt Lib "GDI32.DLL" ( _
        ByVal hdcDest As IntPtr, _
        ByVal nXDest As Integer, _
        ByVal nYDest As Integer, _
        ByVal nWidth As Integer, _
        ByVal nHeight As Integer, _
        ByVal hdcSrc As IntPtr, _
        ByVal nXSrc As Integer, _
        ByVal nYSrc As Integer, _
        ByVal dwRop As Int32) As Boolean

    Dim Result As Short
    Dim portno As Short
    Dim multiplex As Short
    Dim gwidth As Integer, gheight As Integer, Byte_Pixel As Integer
    Dim Interrupt_Count As Long
    Dim frame_NO As Long
    Dim Lb_Save As Boolean

    Private Shared mut As New System.Threading.Mutex
    Private Enter_CallBack As Boolean

    Dim srcPic As Graphics '= src.CreateGraphics             'Get a Graphics Object from the form 
    Dim srcBmp As Bitmap 'New Bitmap(src.Width, src.Height, srcPic) 'Create a EMPTY bitmap from that graphics 
    Dim srcMem As Graphics '= Graphics.FromImage(srcBmp)     'Create a Graphics object in memory from that bitmap 
    Dim HDC1 As IntPtr '= srcPic.GetHdc                      'get the IntPtr's of the graphics 
    Dim HDC2 As IntPtr '= srcMem.GetHdc                      'get the IntPtr's of the graphics 



    Public size_byte As Long
    Public hEventAngelo As Long
    Public continue_thread As Boolean




#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents Combo3 As System.Windows.Forms.ComboBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents Combo1 As System.Windows.Forms.ComboBox
    Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
    Friend WithEvents Combo2 As System.Windows.Forms.ComboBox
    Friend WithEvents Combo4 As System.Windows.Forms.ComboBox
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Folder1 As System.Windows.Forms.FolderBrowserDialog
    Friend WithEvents Button4 As System.Windows.Forms.Button
    Friend WithEvents PathName As System.Windows.Forms.TextBox
    Friend WithEvents Timer1 As System.Windows.Forms.Timer
    Friend WithEvents Bon_Save As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.Button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.Combo3 = New System.Windows.Forms.ComboBox
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.Combo4 = New System.Windows.Forms.ComboBox
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.Combo1 = New System.Windows.Forms.ComboBox
        Me.GroupBox4 = New System.Windows.Forms.GroupBox
        Me.Combo2 = New System.Windows.Forms.ComboBox
        Me.Button3 = New System.Windows.Forms.Button
        Me.Folder1 = New System.Windows.Forms.FolderBrowserDialog
        Me.Label2 = New System.Windows.Forms.Label
        Me.PathName = New System.Windows.Forms.TextBox
        Me.Button4 = New System.Windows.Forms.Button
        Me.Bon_Save = New System.Windows.Forms.Button
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.GroupBox4.SuspendLayout()
        Me.SuspendLayout()
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(632, 280)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(144, 21)
        Me.Button1.TabIndex = 4
        Me.Button1.Text = "Continuous Grab"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(632, 320)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(144, 22)
        Me.Button2.TabIndex = 5
        Me.Button2.Text = "Stop Grab"
        '
        'PictureBox1
        '
        Me.PictureBox1.Location = New System.Drawing.Point(19, 7)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(541, 409)
        Me.PictureBox1.TabIndex = 6
        Me.PictureBox1.TabStop = False
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(632, 376)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(154, 21)
        Me.TextBox1.TabIndex = 7
        Me.TextBox1.Text = "0"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(632, 352)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(144, 23)
        Me.Label1.TabIndex = 8
        Me.Label1.Text = "Interrupt Count :"
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.Combo3)
        Me.GroupBox1.Location = New System.Drawing.Point(584, 16)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(202, 45)
        Me.GroupBox1.TabIndex = 9
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Video Format"
        '
        'Combo3
        '
        Me.Combo3.Items.AddRange(New Object() {"FULL NTSC", "FULL PAL", "CIF    NTSC", "CIF    PAL", "QCIF NTSC", "QCIF PAL"})
        Me.Combo3.Location = New System.Drawing.Point(38, 15)
        Me.Combo3.Name = "Combo3"
        Me.Combo3.Size = New System.Drawing.Size(146, 20)
        Me.Combo3.TabIndex = 3
        Me.Combo3.Text = "ComboBox3"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.Combo4)
        Me.GroupBox2.Location = New System.Drawing.Point(584, 72)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(202, 45)
        Me.GroupBox2.TabIndex = 10
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Color Format"
        '
        'Combo4
        '
        Me.Combo4.Items.AddRange(New Object() {"RGB16", "RGB24"})
        Me.Combo4.Location = New System.Drawing.Point(43, 15)
        Me.Combo4.Name = "Combo4"
        Me.Combo4.Size = New System.Drawing.Size(145, 20)
        Me.Combo4.TabIndex = 12
        Me.Combo4.Text = "ComboBox1"
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.Combo1)
        Me.GroupBox3.Location = New System.Drawing.Point(584, 120)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(202, 45)
        Me.GroupBox3.TabIndex = 11
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "Port No"
        '
        'Combo1
        '
        Me.Combo1.Items.AddRange(New Object() {"0", "1", "2", "3"})
        Me.Combo1.Location = New System.Drawing.Point(38, 13)
        Me.Combo1.Name = "Combo1"
        Me.Combo1.Size = New System.Drawing.Size(144, 20)
        Me.Combo1.TabIndex = 1
        Me.Combo1.Text = "ComboBox1"
        '
        'GroupBox4
        '
        Me.GroupBox4.Controls.Add(Me.Combo2)
        Me.GroupBox4.Location = New System.Drawing.Point(584, 176)
        Me.GroupBox4.Name = "GroupBox4"
        Me.GroupBox4.Size = New System.Drawing.Size(202, 45)
        Me.GroupBox4.TabIndex = 12
        Me.GroupBox4.TabStop = False
        Me.GroupBox4.Text = "Channel No"
        '
        'Combo2
        '

⌨️ 快捷键说明

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