VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3435 ClientLeft = 60 ClientTop = 345 ClientWidth = 4770 LinkTopic = "Form1" ScaleHeight = 3435 ScaleWidth = 4770 StartUpPosition = 3 'Windows Default Begin VB.Timer Timer3 Interval = 1 Left = 600 Top = 1800 End Begin VB.Timer Timer2 Interval = 1 Left = 840 Top = 1200 End Begin VB.Timer Timer1 Interval = 1 Left = 360 Top = 1200 End Begin VB.Label Label1 BackStyle = 0 'Transparent Height = 2895 Left = 840 TabIndex = 0 Top = 0 Width = 3855 End Begin VB.Shape Shape9 BackColor = &H00000000& BackStyle = 1 'Opaque Height = 135 Left = 2640 Shape = 3 'Circle Top = 1440 Width = 135 End Begin VB.Shape Shape8 BackColor = &H00000000& BackStyle = 1 'Opaque Height = 135 Left = 2520 Shape = 3 'Circle Top = 1440 Width = 135 End Begin VB.Shape Shape7 BackColor = &H00C0FFFF& BackStyle = 1 'Opaque Height = 495 Left = 2400 Shape = 5 'Rounded Square Top = 1200 Width = 495 End Begin VB.Shape Shape6 BackColor = &H008080FF& BackStyle = 1 'Opaque Height = 375 Left = 1920 Shape = 2 'Oval Top = 1920 Width = 1455 End Begin VB.Shape Shape5 BackColor = &H00000000& BackStyle = 1 'Opaque Height = 375 Left = 3000 Shape = 3 'Circle Top = 720 Width = 375 End Begin VB.Shape Shape4 BackColor = &H00000000& BackStyle = 1 'Opaque Height = 375 Left = 1920 Shape = 3 'Circle Top = 720 Width = 375 End Begin VB.Shape Shape3 BackColor = &H008080FF& BackStyle = 1 'Opaque Height = 375 Left = 1920 Shape = 2 'Oval Top = 1800 Width = 1455 End Begin VB.Shape Shape2 BackStyle = 1 'Opaque Height = 975 Left = 2760 Shape = 3 'Circle Top = 360 Width = 975 End Begin VB.Shape Shape1 BackStyle = 1 'Opaque Height = 975 Left = 1560 Shape = 3 'Circle Top = 360 Width = 975 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long Dim a As New Form1 'Объявляем переменную a как новую форму Private Sub Form_Load() 'При запуске формы, делаем ее круглой: SetWindowRgn hWnd, CreateEllipticRgn(80, 0, 300, 200), True 'Цифры в скобках означают что - то типо координат, например, изменив первую цифру(80), окно сузится, или расширится Shape4.Left = 1920 Shape5.Left = 3000 Shape4.Top = 720 Shape5.Top = 720 Timer1.Enabled = True Timer3.Enabled = True End Sub Private Sub Form_Unload(Cancel As Integer) MsgBox "Хей! Юзер поганый, только попробуй меня закрыть... ", 20, "Не надо - ПЛИЗ!!!" ' Идет запрос MsgBox "У тебя ничего не выйдет, даже не пытайся! ХЕ-ХЕ-ХЕ!!!", vbCritical, "Ну, чувак, ты подстрял!!!" Cancel = True End Sub Private Sub Label1_Click() a.Show 'Будет показываться новая форма End Sub Private Sub Timer1_Timer() Shape4.Top = Shape4.Top - 100 Shape5.Top = Shape5.Top - 100 Shape4.Left = Shape4.Left - 100 Shape5.Left = Shape5.Left - 100 End Sub Private Sub Timer2_Timer() Shape4.Top = Shape4.Top + 100 Shape5.Top = Shape5.Top + 100 Shape4.Left = Shape4.Left + 100 Shape5.Left = Shape5.Left + 100 End Sub Private Sub Timer3_Timer() If Shape4.Top <= 360 + 975 Or Shape5.Top <= 360 + 975 Then Timer1.Enabled = False ' Timer1 выключается Timer2.Enabled = True ' Timer2 включается End If If Shape4.Top >= 360 Or Shape5.Top >= 360 Then Timer1.Enabled = True ' Timer1 включается Timer2.Enabled = False ' Timer2 выключается End If If Shape4.Left <= 1560 + 975 Or Shape5.Left <= 2760 + 975 Then Timer1.Enabled = False ' Timer1 выключается Timer2.Enabled = True ' Timer2 включается End If If Shape4.Left >= 1560 + 975 Or Shape5.Left >= 2760 + 975 Then Timer1.Enabled = True ' Timer1 включается Timer2.Enabled = False ' Timer2 выключается End If End Sub