home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / COMPTOOL / ACTVCOMP / CTLPLUS / TCPFORM1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-26  |  5.6 KB  |  165 lines

  1. VERSION 5.00
  2. Object = "*\ACtlPlus.vbp"
  3. Begin VB.Form Form1 
  4.    AutoRedraw      =   -1  'True
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   5085
  8.    ClientTop       =   2055
  9.    ClientWidth     =   4680
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   213
  12.    ScaleMode       =   3  'Pixel
  13.    ScaleWidth      =   312
  14.    Begin VB.TextBox Text2 
  15.       Height          =   375
  16.       Left            =   1200
  17.       TabIndex        =   3
  18.       Top             =   1920
  19.       Width           =   3135
  20.    End
  21.    Begin VB.TextBox Text1 
  22.       Height          =   375
  23.       Left            =   1200
  24.       TabIndex        =   1
  25.       Top             =   1320
  26.       Width           =   3135
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "&Cycle"
  30.       Height          =   375
  31.       Left            =   2040
  32.       TabIndex        =   4
  33.       Top             =   2640
  34.       Width           =   2415
  35.    End
  36.    Begin CtlPlus.ShapeLabel ShapeLabel2 
  37.       Height          =   495
  38.       Index           =   0
  39.       Left            =   240
  40.       TabIndex        =   0
  41.       Top             =   1080
  42.       Width           =   1335
  43.       _ExtentX        =   1720
  44.       _ExtentY        =   873
  45.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  46.          Name            =   "MS Sans Serif"
  47.          Size            =   8.25
  48.          Charset         =   0
  49.          Weight          =   400
  50.          Underline       =   0   'False
  51.          Italic          =   0   'False
  52.          Strikethrough   =   0   'False
  53.       EndProperty
  54.       Alignment       =   0
  55.       BorderWidth     =   6
  56.       Caption         =   "&First Name"
  57.    End
  58.    Begin CtlPlus.ShapeLabel ShapeLabel1 
  59.       Height          =   855
  60.       Left            =   480
  61.       TabIndex        =   5
  62.       Top             =   120
  63.       Width           =   3735
  64.       _ExtentX        =   6588
  65.       _ExtentY        =   1508
  66.       ForeColor       =   16777215
  67.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  68.          Name            =   "Tahoma"
  69.          Size            =   12
  70.          Charset         =   0
  71.          Weight          =   700
  72.          Underline       =   0   'False
  73.          Italic          =   -1  'True
  74.          Strikethrough   =   0   'False
  75.       EndProperty
  76.       BorderStyle     =   1
  77.       BorderColor     =   16776960
  78.       BorderWidth     =   2
  79.       Caption         =   "Your Message Here"
  80.    End
  81.    Begin CtlPlus.ShapeLabel ShapeLabel2 
  82.       Height          =   495
  83.       Index           =   1
  84.       Left            =   240
  85.       TabIndex        =   2
  86.       Top             =   1680
  87.       Width           =   1335
  88.       _ExtentX        =   1720
  89.       _ExtentY        =   873
  90.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  91.          Name            =   "MS Sans Serif"
  92.          Size            =   8.25
  93.          Charset         =   0
  94.          Weight          =   400
  95.          Underline       =   0   'False
  96.          Italic          =   0   'False
  97.          Strikethrough   =   0   'False
  98.       EndProperty
  99.       Alignment       =   0
  100.       BorderWidth     =   6
  101.       Caption         =   "&Last Name"
  102.    End
  103.    Begin VB.Image Image1 
  104.       Height          =   960
  105.       Left            =   3600
  106.       Picture         =   "TCPForm1.frx":0000
  107.       Top             =   2040
  108.       Width           =   960
  109.    End
  110. Attribute VB_Name = "Form1"
  111. Attribute VB_GlobalNameSpace = False
  112. Attribute VB_Creatable = False
  113. Attribute VB_PredeclaredId = True
  114. Attribute VB_Exposed = False
  115. Option Explicit
  116. Private Sub Command1_Click()
  117.     On Error Resume Next
  118.     ShapeLabel1.Alignment = ShapeLabel1.Alignment + 1
  119.     If Err.Number <> 0 Then ShapeLabel1.Alignment = 0
  120.     Err.Number = 0
  121.     ShapeLabel1.BackColor = QBColor(Int(Rnd * 16))
  122.     ShapeLabel1.BorderColor = QBColor(Int(Rnd * 16))
  123.     ShapeLabel1.BorderStyle = ShapeLabel1.BorderStyle + 1
  124.     If Err.Number <> 0 Then ShapeLabel1.BorderStyle = 0
  125.     Err.Number = 0
  126.     ShapeLabel1.BorderWidth = ShapeLabel1.BorderWidth + 1
  127.     If ShapeLabel1.BorderWidth > 7 Then ShapeLabel1.BorderWidth = 1
  128.     ShapeLabel1.ForeColor = QBColor(Int(Rnd * 16))
  129.     ShapeLabel1.Font.Bold = ShapeLabel1.Font.Bold Xor True
  130.     ShapeLabel1.Font.Italic = ShapeLabel1.Font.Italic Xor True
  131.     ShapeLabel1.Font.Size = ShapeLabel1.Font.Size + 1
  132.     If ShapeLabel1.Font.Size > 16 Then ShapeLabel1.Font.Size = 10
  133.     ShapeLabel1.MousePointer = ShapeLabel1.MousePointer + 1
  134.     If Err.Number <> 0 Then ShapeLabel1.MousePointer = 0
  135.     Err.Number = 0
  136.     ShapeLabel1.Shape = ShapeLabel1.Shape + 1
  137.     If Err.Number <> 0 Then ShapeLabel1.Shape = 0
  138.     Err.Number = 0
  139.     If ShapeLabel1.ToolTipText <> "" Then
  140.         ShapeLabel1.ToolTipText = ""
  141.     Else
  142.         ShapeLabel1.ToolTipText = "This is a ToolTip"
  143.     End If
  144. End Sub
  145. Private Sub Form_Load()
  146.     Dim intX As Integer
  147.     Dim intY As Integer
  148.     Dim sngWidth As Single
  149.     Dim sngHeight As Single
  150.     sngWidth = Image1.Width
  151.     sngHeight = Image1.Height
  152.     For intX = 0 To Int(ScaleWidth / sngWidth)
  153.         For intY = 0 To Int(ScaleHeight / sngHeight)
  154.             PaintPicture Image1.Picture, intX * sngWidth, intY * sngHeight, sngWidth, sngHeight, 0, 0
  155.         Next
  156.     Next
  157. End Sub
  158. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  159.     ShapeLabel2(0).BackColor = vbRed
  160.     ShapeLabel2(1).BackColor = vbRed
  161. End Sub
  162. Private Sub ShapeLabel2_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  163.     ShapeLabel2(Index).BackColor = vbGreen
  164. End Sub
  165.