frmprint.frm

来自「Visual Basic 6 大学教程的代码」· FRM 代码 · 共 39 行

FRM
39
字号
VERSION 5.00
Begin VB.Form frmPrint 
   Caption         =   "Fig. 9.5: Printing to the Form"
   ClientHeight    =   3195
   ClientLeft      =   2865
   ClientTop       =   2340
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   Begin VB.CommandButton cmdPrint 
      Caption         =   "Print"
      Height          =   495
      Left            =   1680
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   End
End
Attribute VB_Name = "frmPrint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 9.5
' Printing to the form
Option Explicit

Private Sub cmdPrint_Click()
   Call Randomize
   
   ' Randomly pick values to draw at
   CurrentX = Rnd() * Width
   CurrentY = Rnd() * Height
   
   ' Print at (CurrentX, CurrentY)
   Print "VB6 How To Program"
End Sub

⌨️ 快捷键说明

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