home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 7_2009-2012.ISO / data / zips / Sunflower22164712122011.psc / frmMain.frm < prev    next >
Text File  |  2011-12-07  |  5KB  |  184 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    AutoRedraw      =   -1  'True
  4.    Caption         =   "PHI"
  5.    ClientHeight    =   7530
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   15240
  9.    BeginProperty Font 
  10.       Name            =   "Courier New"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    LinkTopic       =   "Form1"
  19.    ScaleHeight     =   502
  20.    ScaleMode       =   3  'Pixel
  21.    ScaleWidth      =   1016
  22.    StartUpPosition =   1  'CenterOwner
  23.    WindowState     =   2  'Maximized
  24.    Begin VB.CheckBox chJpg 
  25.       Caption         =   "Save Frames"
  26.       Height          =   255
  27.       Left            =   13200
  28.       TabIndex        =   9
  29.       Top             =   6840
  30.       Width           =   1695
  31.    End
  32.    Begin VB.CommandButton Command1 
  33.       Caption         =   " phi"
  34.       Height          =   615
  35.       Left            =   13200
  36.       TabIndex        =   0
  37.       Top             =   240
  38.       Width           =   975
  39.    End
  40.    Begin VB.CheckBox chRad 
  41.       Caption         =   "Radius"
  42.       Height          =   255
  43.       Left            =   13200
  44.       TabIndex        =   7
  45.       Top             =   2760
  46.       Width           =   1695
  47.    End
  48.    Begin VB.PictureBox Picture1 
  49.       Appearance      =   0  'Flat
  50.       AutoRedraw      =   -1  'True
  51.       BackColor       =   &H80000005&
  52.       BorderStyle     =   0  'None
  53.       ForeColor       =   &H80000008&
  54.       Height          =   1215
  55.       Left            =   12960
  56.       ScaleHeight     =   1215
  57.       ScaleWidth      =   1935
  58.       TabIndex        =   6
  59.       Top             =   3960
  60.       Width           =   1935
  61.    End
  62.    Begin VB.HScrollBar sSpeed 
  63.       Height          =   375
  64.       Left            =   13200
  65.       Max             =   100
  66.       Min             =   1
  67.       TabIndex        =   4
  68.       Top             =   3480
  69.       Value           =   100
  70.       Width           =   975
  71.    End
  72.    Begin VB.TextBox txtN 
  73.       Alignment       =   2  'Center
  74.       Height          =   375
  75.       Left            =   13200
  76.       TabIndex        =   3
  77.       Text            =   "500"
  78.       ToolTipText     =   "N of Points"
  79.       Top             =   2040
  80.       Width           =   975
  81.    End
  82.    Begin VB.CommandButton Command2 
  83.       Caption         =   " stop"
  84.       Height          =   615
  85.       Left            =   13200
  86.       TabIndex        =   2
  87.       Top             =   1200
  88.       Width           =   975
  89.    End
  90.    Begin VB.PictureBox PIC 
  91.       Appearance      =   0  'Flat
  92.       AutoRedraw      =   -1  'True
  93.       BackColor       =   &H00000000&
  94.       BorderStyle     =   0  'None
  95.       ForeColor       =   &H80000008&
  96.       Height          =   7095
  97.       Left            =   120
  98.       ScaleHeight     =   7095
  99.       ScaleWidth      =   9015
  100.       TabIndex        =   1
  101.       Top             =   120
  102.       Width           =   9015
  103.    End
  104.    Begin VB.Label Label2 
  105.       Alignment       =   2  'Center
  106.       Caption         =   "speed"
  107.       Height          =   255
  108.       Left            =   13200
  109.       TabIndex        =   8
  110.       Top             =   3240
  111.       Width           =   975
  112.    End
  113.    Begin VB.Label Label1 
  114.       Alignment       =   2  'Center
  115.       Height          =   255
  116.       Left            =   13200
  117.       TabIndex        =   5
  118.       Top             =   7080
  119.       Width           =   1815
  120.    End
  121. End
  122. Attribute VB_Name = "frmMain"
  123. Attribute VB_GlobalNameSpace = False
  124. Attribute VB_Creatable = False
  125. Attribute VB_PredeclaredId = True
  126. Attribute VB_Exposed = False
  127. Option Explicit
  128.  
  129.  
  130.  
  131.  
  132. Private Sub Command1_Click()
  133.     Command1.Enabled = False
  134.     Animation PIC, Val(txtN), sSpeed.Value
  135.  
  136. End Sub
  137.  
  138. Private Sub Command2_Click()
  139.     ExitLoop = True
  140.  
  141. End Sub
  142.  
  143. Private Sub Form_Load()
  144.  
  145.  
  146.     PIC.AutoSize = True
  147.     PIC = LoadPicture(App.Path & "\sunflower.jpg")
  148.  
  149.     Picture1.Width = PIC.Width * 0.33
  150.     Picture1.Height = PIC.Height * 0.33
  151.     SetStretchBltMode Picture1.hDC, STRETCHMODE
  152.     StretchBlt Picture1.hDC, 0, 0, Picture1.Width, Picture1.Height, PIC.hDC, _
  153.                0, 0, PIC.Width, PIC.Height, vbSrcCopy
  154.  
  155.  
  156.  
  157.     PIC.Cls
  158.     PIC.AutoSize = False
  159.     PIC.Refresh
  160.  
  161.  
  162.  
  163.     PIC.Height = 640
  164.     PIC.Width = Int(4 / 3 * PIC.Height)
  165.  
  166.     cX = PIC.Width \ 2
  167.     cY = PIC.Height \ 2
  168.  
  169.     Me.Show
  170.     Me.Refresh
  171.     DoEvents
  172.  
  173.     If Dir(App.Path & "\Frames", vbDirectory) = "" Then MkDir App.Path & "\Frames"
  174.     If Dir(App.Path & "\Frames\*.jpg") <> "" Then Kill App.Path & "\Frames\*.jpg"
  175.  
  176. End Sub
  177.  
  178. Private Sub Form_Unload(Cancel As Integer)
  179.     Erase P
  180.     End
  181.  
  182. End Sub
  183.  
  184.