Caption = "Selecting, resizing and stretching images"
Height = 4065
Left = 1215
LinkTopic = "Form3"
ScaleHeight = 3570
ScaleWidth = 7545
Top = 2025
Width = 7755
Begin Label Label2
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."
Height = 1215
Left = 0
TabIndex = 1
Top = 0
Width = 7575
End
Begin Siz Siz4
AutoMove = 0 'False
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Handles = 0 'False
Height = 495
Left = 3600
Picture = DEMOSLCT.FRX:0000
Top = 1800
Width = 1215
End
Begin Siz Siz3
AutoMove = 0 'False
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Handles = 0 'False
Height = 735
Left = 1800
Picture = DEMOSLCT.FRX:0626
Top = 1680
Width = 1335
End
Option Explicit
Sub Siz3_Click ()
If siz3.Handles = True Then Exit Sub 'Already selected
siz3.Visible = False ' Hide it for a moment
siz3.BorderStyle = 1
siz3.Handles = True
siz3.AutoMove = True
siz3.Visible = True ' Redisplay without handles or border
siz4.Visible = False ' Eliminate flicker
siz4.BorderStyle = 0
siz4.Handles = False
siz4.AutoMove = False
siz4.Visible = True ' Redisplay it with handles and border
End Sub
Sub Siz3_Resize (Corner As Integer)
siz3.ZOrder
End Sub
Sub Siz4_Click ()
If siz4.Handles = True Then Exit Sub 'Already selected
siz4.Visible = False ' Hide it for a moment
siz4.BorderStyle = 1
siz4.Handles = True
siz4.AutoMove = True
siz4.Visible = True ' Redisplay with no handles or border
siz3.Visible = False ' Eliminate flicker
siz3.BorderStyle = 0
siz3.Handles = False
siz3.AutoMove = False
siz3.Visible = True ' Redisplay with handles and border