home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_2 / SIZECTRL / DEMOSLCT.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-03-01  |  2.7 KB  |  74 lines

  1. VERSION 2.00
  2. Begin Form Form3 
  3.    Caption         =   "Selecting, resizing and stretching images"
  4.    Height          =   4065
  5.    Left            =   1215
  6.    LinkTopic       =   "Form3"
  7.    ScaleHeight     =   3570
  8.    ScaleWidth      =   7545
  9.    Top             =   2025
  10.    Width           =   7755
  11.    Begin Label Label2 
  12.       Caption         =   "You can select either the clock face or the phony button by clicking on it.  When either is selected, corner ""handles"" and a border appear.  Only a selected control can be resized or moved.  The code to handle this is in the Click event procedures for Siz3 and Siz4.  Watch the contents of the selected control shrink or stretch to fit it.  Note that the controls move themselves; you don't have to write code for dragging, moving and dropping SIZ controls."
  13.       Height          =   1215
  14.       Left            =   0
  15.       TabIndex        =   1
  16.       Top             =   0
  17.       Width           =   7575
  18.    End
  19.    Begin Siz Siz4 
  20.       AutoMove        =   0   'False
  21.       BackColor       =   &H00FFFFFF&
  22.       BorderStyle     =   0  'None
  23.       Handles         =   0   'False
  24.       Height          =   495
  25.       Left            =   3600
  26.       Picture         =   DEMOSLCT.FRX:0000
  27.       Top             =   1800
  28.       Width           =   1215
  29.    End
  30.    Begin Siz Siz3 
  31.       AutoMove        =   0   'False
  32.       BackColor       =   &H00FFFFFF&
  33.       BorderStyle     =   0  'None
  34.       Handles         =   0   'False
  35.       Height          =   735
  36.       Left            =   1800
  37.       Picture         =   DEMOSLCT.FRX:0626
  38.       Top             =   1680
  39.       Width           =   1335
  40.    End
  41. Option Explicit
  42. Sub Siz3_Click ()
  43.   If siz3.Handles = True Then Exit Sub 'Already selected
  44.   siz3.Visible = False  ' Hide it for a moment
  45.   siz3.BorderStyle = 1
  46.   siz3.Handles = True
  47.   siz3.AutoMove = True
  48.   siz3.Visible = True   ' Redisplay without handles or border
  49.   siz4.Visible = False  ' Eliminate flicker
  50.   siz4.BorderStyle = 0
  51.   siz4.Handles = False
  52.   siz4.AutoMove = False
  53.   siz4.Visible = True   ' Redisplay it with handles and border
  54. End Sub
  55. Sub Siz3_Resize (Corner As Integer)
  56.   siz3.ZOrder
  57. End Sub
  58. Sub Siz4_Click ()
  59.   If siz4.Handles = True Then Exit Sub 'Already selected
  60.   siz4.Visible = False ' Hide it for a moment
  61.   siz4.BorderStyle = 1
  62.   siz4.Handles = True
  63.   siz4.AutoMove = True
  64.   siz4.Visible = True  ' Redisplay with no handles or border
  65.   siz3.Visible = False  ' Eliminate flicker
  66.   siz3.BorderStyle = 0
  67.   siz3.Handles = False
  68.   siz3.AutoMove = False
  69.   siz3.Visible = True   ' Redisplay with handles and border
  70. End Sub
  71. Sub Siz4_Resize (Corner As Integer)
  72.   siz4.ZOrder
  73. End Sub
  74.