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

📄 v6b06-26.frm

📁 金旭亮的java教案
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "VB6 例6-26 图形叠加"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "XOR 叠加"
      Height          =   435
      Left            =   1920
      TabIndex        =   1
      Top             =   2280
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "随机射线"
      Height          =   435
      Left            =   3240
      TabIndex        =   0
      Top             =   2280
      Width           =   1095
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x1 As Single, y1 As Single, x2 As Single, y2 As Single
Private Sub Command1_Click()
    Dim i, colorcode
    For i = 1 To 100
    X = 320 * Rnd                           ' 产生x坐标
    If Rnd < 0.5 Then X = -X
    Y = 240 * Rnd                           ' 产生y坐标
    If Rnd < 0.5 Then Y = -Y
    colorcode = 15 * Rnd                    ' 产生色彩代码
    Line (0, 0)-(X, Y), QBColor(colorcode)
    Next i
End Sub
Private Sub Command2_Click()
    Static X, Y As Single, colorcode As Integer
    'Line (0, 0)-(X, Y), QBColor(colorcode), BF
    X = 200 * Rnd
    If Rnd < 0.5 Then X = -X
    Y = 100 * Rnd
    If Rnd < 0.5 Then Y = -Y
    colorcode = 15 * Rnd
    'Line (0, 0)-(X, Y), QBColor(colorcode), BF
    DrawWidth = 5
    Circle (0, 0), 100, QBColor(7)
    DrawWidth = 1
End Sub

Private Sub Form_Load()
    Scale (-320, 240)-(320, -240)
    DrawMode = 7
End Sub

⌨️ 快捷键说明

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