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

📄 ultrax.vb

📁 Test a sample application
💻 VB
字号:
Imports system.Drawing



Public Class Ultrax
    Private g As Graphics
    Private bmp_background As Bitmap

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Dim bmp As New Bitmap("Grapes.jpg")
        'g.DrawImage(bmp, 0, 0)
        g.DrawRectangle(New System.Drawing.Pen(Color.Red), 50, 50, 100, 100)
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        bmp_background = New Bitmap("desktop_vga.bmp")
        g = Me.CreateGraphics
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        e.Graphics.DrawImage(bmp_background, 0, 0)
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pic_OUT.Click
        Dim f As New Read_Card
        f.Mode = "OUT"
        f.Show()
    End Sub

    Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic_OUT.MouseDown
        'PictureBox1.BackColor = Color.LightSeaGreen
        g.DrawRectangle(New System.Drawing.Pen(Color.White, 3), pic_OUT.Left - 2, pic_OUT.Top - 2, pic_OUT.Width + 3, pic_OUT.Height + 3)
    End Sub

    Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic_OUT.MouseUp
        'PictureBox1.BackColor = Color.Transparent
        g.DrawImage(bmp_background, 0, 0)
    End Sub

End Class

⌨️ 快捷键说明

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