home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / MM_Very_Ve214278252009.psc / Form1.frm < prev    next >
Text File  |  2009-02-05  |  8KB  |  256 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4275
  5.    ClientLeft      =   4110
  6.    ClientTop       =   465
  7.    ClientWidth     =   9210
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4275
  10.    ScaleWidth      =   9210
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.PictureBox Picture1 
  13.       AutoRedraw      =   -1  'True
  14.       AutoSize        =   -1  'True
  15.       BorderStyle     =   0  'None
  16.       Height          =   270
  17.       Index           =   4
  18.       Left            =   405
  19.       Picture         =   "Form1.frx":0000
  20.       ScaleHeight     =   270
  21.       ScaleWidth      =   7020
  22.       TabIndex        =   6
  23.       Top             =   3030
  24.       Width           =   7020
  25.       Begin VB.Label Label1 
  26.          BackStyle       =   0  'Transparent
  27.          Caption         =   "Label1"
  28.          ForeColor       =   &H00000000&
  29.          Height          =   255
  30.          Index           =   3
  31.          Left            =   345
  32.          TabIndex        =   10
  33.          Top             =   30
  34.          Width           =   585
  35.       End
  36.       Begin VB.Image Image1 
  37.          Height          =   255
  38.          Index           =   4
  39.          Left            =   45
  40.          Picture         =   "Form1.frx":62FA
  41.          Stretch         =   -1  'True
  42.          Top             =   0
  43.          Width           =   135
  44.       End
  45.    End
  46.    Begin VB.PictureBox Picture1 
  47.       AutoRedraw      =   -1  'True
  48.       AutoSize        =   -1  'True
  49.       BorderStyle     =   0  'None
  50.       Height          =   195
  51.       Index           =   3
  52.       Left            =   405
  53.       Picture         =   "Form1.frx":BF24
  54.       ScaleHeight     =   195
  55.       ScaleWidth      =   4095
  56.       TabIndex        =   5
  57.       Top             =   2115
  58.       Width           =   4095
  59.       Begin VB.Label Label1 
  60.          BackStyle       =   0  'Transparent
  61.          Caption         =   "Label1"
  62.          Height          =   255
  63.          Index           =   1
  64.          Left            =   345
  65.          TabIndex        =   8
  66.          Top             =   0
  67.          Width           =   585
  68.       End
  69.       Begin VB.Image Image1 
  70.          Height          =   195
  71.          Index           =   3
  72.          Left            =   15
  73.          Picture         =   "Form1.frx":E90A
  74.          Stretch         =   -1  'True
  75.          Top             =   0
  76.          Width           =   105
  77.       End
  78.    End
  79.    Begin VB.PictureBox Picture1 
  80.       AutoRedraw      =   -1  'True
  81.       AutoSize        =   -1  'True
  82.       BorderStyle     =   0  'None
  83.       Height          =   345
  84.       Index           =   2
  85.       Left            =   405
  86.       Picture         =   "Form1.frx":112BC
  87.       ScaleHeight     =   345
  88.       ScaleWidth      =   8310
  89.       TabIndex        =   4
  90.       Top             =   3465
  91.       Width           =   8310
  92.       Begin VB.Label Label1 
  93.          BackStyle       =   0  'Transparent
  94.          Caption         =   "Label1"
  95.          Height          =   255
  96.          Index           =   4
  97.          Left            =   330
  98.          TabIndex        =   11
  99.          Top             =   90
  100.          Width           =   585
  101.       End
  102.       Begin VB.Image Image1 
  103.          Height          =   345
  104.          Index           =   2
  105.          Left            =   30
  106.          Picture         =   "Form1.frx":1A87E
  107.          Stretch         =   -1  'True
  108.          Top             =   0
  109.          Width           =   105
  110.       End
  111.    End
  112.    Begin VB.PictureBox Picture1 
  113.       AutoRedraw      =   -1  'True
  114.       AutoSize        =   -1  'True
  115.       BorderStyle     =   0  'None
  116.       Height          =   270
  117.       Index           =   1
  118.       Left            =   405
  119.       Picture         =   "Form1.frx":23DE4
  120.       ScaleHeight     =   270
  121.       ScaleWidth      =   5430
  122.       TabIndex        =   3
  123.       Top             =   2550
  124.       Width           =   5430
  125.       Begin VB.Label Label1 
  126.          BackStyle       =   0  'Transparent
  127.          Caption         =   "Label1"
  128.          Height          =   255
  129.          Index           =   2
  130.          Left            =   315
  131.          TabIndex        =   9
  132.          Top             =   45
  133.          Width           =   585
  134.       End
  135.       Begin VB.Image Image1 
  136.          Height          =   270
  137.          Index           =   1
  138.          Left            =   30
  139.          Picture         =   "Form1.frx":28AA6
  140.          Stretch         =   -1  'True
  141.          Top             =   0
  142.          Width           =   105
  143.       End
  144.    End
  145.    Begin VB.CheckBox Check1 
  146.       Caption         =   "&Timer"
  147.       Height          =   270
  148.       Left            =   630
  149.       TabIndex        =   2
  150.       Top             =   750
  151.       Value           =   1  'Checked
  152.       Width           =   750
  153.    End
  154.    Begin VB.HScrollBar HScroll1 
  155.       Enabled         =   0   'False
  156.       Height          =   270
  157.       Left            =   645
  158.       SmallChange     =   5
  159.       TabIndex        =   1
  160.       Top             =   1185
  161.       Width           =   4065
  162.    End
  163.    Begin VB.Timer Timer1 
  164.       Interval        =   10
  165.       Left            =   600
  166.       Top             =   225
  167.    End
  168.    Begin VB.PictureBox Picture1 
  169.       AutoRedraw      =   -1  'True
  170.       AutoSize        =   -1  'True
  171.       BorderStyle     =   0  'None
  172.       Height          =   195
  173.       Index           =   0
  174.       Left            =   405
  175.       Picture         =   "Form1.frx":2D6D8
  176.       ScaleHeight     =   195
  177.       ScaleWidth      =   4110
  178.       TabIndex        =   0
  179.       Top             =   1725
  180.       Width           =   4110
  181.       Begin VB.Label Label1 
  182.          BackStyle       =   0  'Transparent
  183.          Caption         =   "Label1"
  184.          Height          =   255
  185.          Index           =   0
  186.          Left            =   375
  187.          TabIndex        =   7
  188.          Top             =   0
  189.          Width           =   585
  190.       End
  191.       Begin VB.Image Image1 
  192.          Height          =   195
  193.          Index           =   0
  194.          Left            =   30
  195.          Picture         =   "Form1.frx":300F2
  196.          Stretch         =   -1  'True
  197.          Top             =   0
  198.          Width           =   120
  199.       End
  200.    End
  201. End
  202. Attribute VB_Name = "Form1"
  203. Attribute VB_GlobalNameSpace = False
  204. Attribute VB_Creatable = False
  205. Attribute VB_PredeclaredId = True
  206. Attribute VB_Exposed = False
  207. Dim i As Integer
  208. Dim nbcontrol As Integer
  209. Private Sub Check1_Click()
  210.     If Check1.Value = 1 Then
  211.         Timer1.Enabled = True
  212.         HScroll1.Enabled = False
  213.     Else
  214.         Timer1.Enabled = False
  215.         HScroll1.Enabled = True
  216.     End If
  217. End Sub
  218.  
  219. Private Sub Form_Load()
  220.     i = 0
  221.     nbcontrol = 4 '---> nbre of scrollbar (0 to 4)
  222.     Me.BackColor = &H8000000F
  223.     HScroll1.Max = 100
  224. End Sub
  225.  
  226. Private Sub HScroll1_Change()
  227.     HScroll1_Scroll
  228. End Sub
  229.  
  230.  
  231. Private Sub HScroll1_Scroll()
  232.  
  233.     For j = 0 To nbcontrol
  234.         Image1(j).Width = HScroll1.Value * (Picture1(j).Width - (Image1(j).Left * 2)) / 100
  235.         Label1(j).Caption = HScroll1.Value & " %"
  236.     Next j
  237.     
  238.     Me.Caption = HScroll1.Value & " %"
  239.  
  240. End Sub
  241. Private Sub Timer1_Timer()
  242.     i = i + 1
  243.     If i > 100 Then
  244.         i = 0
  245.     End If
  246.     
  247.     For j = 0 To nbcontrol
  248.         Image1(j).Width = i * (Picture1(j).Width - (Image1(j).Left * 2)) / 100 'Image1.Width + 10
  249.         Label1(j).Caption = i & " %"
  250.     Next j
  251.     
  252.     Me.Caption = i & " %"
  253. End Sub
  254.  
  255.  
  256.