home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Gradient_C2055663232007.psc / Form2.frm < prev    next >
Text File  |  2007-03-23  |  2KB  |  66 lines

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    Caption         =   "Crash at maximized in your system?"
  4.    ClientHeight    =   3330
  5.    ClientLeft      =   60
  6.    ClientTop       =   405
  7.    ClientWidth     =   3720
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   3330
  10.    ScaleWidth      =   3720
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CheckBox Check1 
  13.       Caption         =   "Circle"
  14.       Height          =   330
  15.       Left            =   30
  16.       TabIndex        =   1
  17.       Top             =   -30
  18.       Width           =   720
  19.    End
  20.    Begin ClockOCX_Test.AnalogClock Clock 
  21.       Height          =   2160
  22.       Left            =   0
  23.       TabIndex        =   0
  24.       Top             =   0
  25.       Width           =   1320
  26.       _ExtentX        =   2328
  27.       _ExtentY        =   3810
  28.    End
  29. End
  30. Attribute VB_Name = "Form2"
  31. Attribute VB_GlobalNameSpace = False
  32. Attribute VB_Creatable = False
  33. Attribute VB_PredeclaredId = True
  34. Attribute VB_Exposed = False
  35. Option Explicit
  36.  
  37. Private Sub Check1_Click()
  38.    Call Form_Resize
  39. End Sub
  40.  
  41. Private Sub Form_Load()
  42.    Me.WindowState = vbMaximized
  43. End Sub
  44.  
  45. Private Sub Form_Resize()
  46.    If Me.WindowState <> vbMinimized Then
  47.       If Check1.Value = vbChecked Then
  48.          If Me.ScaleHeight >= Me.ScaleWidth Then
  49.             Clock.Width = Me.ScaleWidth
  50.             Clock.Height = Me.ScaleWidth
  51.          Else
  52.             Clock.Width = Me.ScaleHeight
  53.             Clock.Height = Me.ScaleHeight
  54.          End If
  55.          
  56.          Clock.Left = (Me.ScaleWidth - Clock.Width) / 2
  57.          Clock.Top = (Me.ScaleHeight - Clock.Height) / 2
  58.       Else
  59.          Clock.Width = Me.ScaleWidth
  60.          Clock.Height = Me.ScaleHeight
  61.          Clock.Left = 0
  62.          Clock.Top = 0
  63.       End If
  64.    End If
  65. End Sub
  66.