home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / vbasic / Data / Utils / animgif1.zip / demofrm.frm < prev    next >
Text File  |  2000-10-26  |  11KB  |  358 lines

  1. VERSION 5.00
  2. Object = "{4DA5E438-AB14-11D4-8FD7-ECFE82B9247E}#1.0#0"; "ANIMGIFDEMO.OCX"
  3. Begin VB.Form Animgif_Demo 
  4.    AutoRedraw      =   -1  'True
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Animated Gif Demo"
  7.    ClientHeight    =   6090
  8.    ClientLeft      =   1725
  9.    ClientTop       =   1785
  10.    ClientWidth     =   7125
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    Picture         =   "demofrm.frx":0000
  15.    ScaleHeight     =   406
  16.    ScaleMode       =   3  'Pixel
  17.    ScaleWidth      =   475
  18.    StartUpPosition =   2  'CenterScreen
  19.    Begin Animgifdemo.Ani_GifDemo Ani_GifDemo1 
  20.       Height          =   480
  21.       Left            =   180
  22.       TabIndex        =   25
  23.       Top             =   60
  24.       Width           =   480
  25.       _ExtentX        =   847
  26.       _ExtentY        =   847
  27.    End
  28.    Begin VB.PictureBox Picture1 
  29.       Height          =   4395
  30.       Left            =   0
  31.       ScaleHeight     =   4335
  32.       ScaleWidth      =   7035
  33.       TabIndex        =   0
  34.       Top             =   1680
  35.       Width           =   7095
  36.       Begin VB.Frame Frame3 
  37.          Caption         =   "Animated Gif Controls"
  38.          Height          =   1335
  39.          Left            =   60
  40.          TabIndex        =   14
  41.          Top             =   2340
  42.          Width           =   6915
  43.          Begin VB.CommandButton Command1 
  44.             Caption         =   "Play Frame 1"
  45.             Enabled         =   0   'False
  46.             Height          =   375
  47.             Left            =   2820
  48.             TabIndex        =   20
  49.             Top             =   240
  50.             Width           =   1335
  51.          End
  52.          Begin VB.CommandButton Command2 
  53.             Caption         =   "pause"
  54.             Enabled         =   0   'False
  55.             Height          =   375
  56.             Left            =   1440
  57.             TabIndex        =   19
  58.             Top             =   240
  59.             Width           =   1335
  60.          End
  61.          Begin VB.CommandButton Command3 
  62.             Caption         =   "play"
  63.             Enabled         =   0   'False
  64.             Height          =   375
  65.             Left            =   60
  66.             TabIndex        =   18
  67.             Top             =   240
  68.             Width           =   1335
  69.          End
  70.          Begin VB.CommandButton Command4 
  71.             Caption         =   "Step"
  72.             Enabled         =   0   'False
  73.             Height          =   375
  74.             Left            =   4200
  75.             TabIndex        =   17
  76.             Top             =   240
  77.             Width           =   1335
  78.          End
  79.          Begin VB.Frame Frame2 
  80.             Caption         =   "Speed Adjust 100%"
  81.             Enabled         =   0   'False
  82.             Height          =   555
  83.             Left            =   60
  84.             TabIndex        =   15
  85.             Top             =   720
  86.             Width           =   6795
  87.             Begin VB.HScrollBar HScroll2 
  88.                Enabled         =   0   'False
  89.                Height          =   195
  90.                Left            =   120
  91.                Max             =   400
  92.                Min             =   10
  93.                TabIndex        =   16
  94.                Top             =   240
  95.                Value           =   100
  96.                Width           =   6555
  97.             End
  98.          End
  99.          Begin VB.Label Label6 
  100.             BorderStyle     =   1  'Fixed Single
  101.             Caption         =   "Frame Number"
  102.             Height          =   255
  103.             Left            =   5640
  104.             TabIndex        =   22
  105.             Top             =   180
  106.             Width           =   1155
  107.          End
  108.          Begin VB.Label Label3 
  109.             BackColor       =   &H00FFFFFF&
  110.             BorderStyle     =   1  'Fixed Single
  111.             Caption         =   "0"
  112.             Height          =   255
  113.             Left            =   6060
  114.             TabIndex        =   21
  115.             Top             =   480
  116.             Width           =   495
  117.          End
  118.       End
  119.       Begin VB.Frame Frame1 
  120.          Caption         =   "Horizontal Position"
  121.          Height          =   555
  122.          Left            =   60
  123.          TabIndex        =   9
  124.          Top             =   3720
  125.          Width           =   6915
  126.          Begin VB.HScrollBar HScroll1 
  127.             Height          =   195
  128.             Left            =   120
  129.             Max             =   500
  130.             TabIndex        =   10
  131.             Top             =   240
  132.             Width           =   6675
  133.          End
  134.       End
  135.       Begin VB.FileListBox File1 
  136.          Height          =   1845
  137.          Left            =   2880
  138.          Pattern         =   "*.cur;*.bmp;*.jpg;*.gif;*.ico;*.wmf"
  139.          TabIndex        =   7
  140.          Top             =   480
  141.          Width           =   2355
  142.       End
  143.       Begin VB.DirListBox Dir1 
  144.          Height          =   1665
  145.          Left            =   60
  146.          TabIndex        =   6
  147.          Top             =   480
  148.          Width           =   2835
  149.       End
  150.       Begin VB.PictureBox Picture2 
  151.          Height          =   1215
  152.          Left            =   5340
  153.          ScaleHeight     =   1155
  154.          ScaleWidth      =   1575
  155.          TabIndex        =   1
  156.          Top             =   780
  157.          Width           =   1635
  158.          Begin VB.CheckBox Check3 
  159.             Caption         =   "Visible"
  160.             Height          =   255
  161.             Left            =   60
  162.             TabIndex        =   8
  163.             Top             =   840
  164.             Value           =   1  'Checked
  165.             Width           =   975
  166.          End
  167.          Begin VB.CheckBox Check1 
  168.             Caption         =   "3D"
  169.             Height          =   195
  170.             Left            =   60
  171.             TabIndex        =   4
  172.             Top             =   360
  173.             Value           =   1  'Checked
  174.             Width           =   1335
  175.          End
  176.          Begin VB.CheckBox Check2 
  177.             Caption         =   "Single"
  178.             Height          =   195
  179.             Left            =   60
  180.             TabIndex        =   3
  181.             Top             =   600
  182.             Width           =   1335
  183.          End
  184.          Begin VB.CheckBox Check4 
  185.             Caption         =   "Checkonly"
  186.             Height          =   255
  187.             Left            =   60
  188.             TabIndex        =   2
  189.             Top             =   60
  190.             Width           =   1095
  191.          End
  192.       End
  193.       Begin VB.Label Label8 
  194.          BackColor       =   &H00FFFFFF&
  195.          BorderStyle     =   1  'Fixed Single
  196.          Caption         =   "Ready"
  197.          Height          =   255
  198.          Left            =   6180
  199.          TabIndex        =   24
  200.          Top             =   2040
  201.          Width           =   780
  202.       End
  203.       Begin VB.Label Label7 
  204.          BackColor       =   &H00FFFF80&
  205.          BorderStyle     =   1  'Fixed Single
  206.          Caption         =   "Status"
  207.          Height          =   255
  208.          Left            =   5340
  209.          TabIndex        =   23
  210.          Top             =   2040
  211.          Width           =   825
  212.       End
  213.       Begin VB.Label Label2 
  214.          BackColor       =   &H00FFFF80&
  215.          BorderStyle     =   1  'Fixed Single
  216.          Caption         =   "Animated "
  217.          Height          =   255
  218.          Left            =   5340
  219.          TabIndex        =   13
  220.          Top             =   480
  221.          Width           =   1065
  222.       End
  223.       Begin VB.Label Label5 
  224.          BackColor       =   &H00FFFFFF&
  225.          BorderStyle     =   1  'Fixed Single
  226.          Caption         =   "False"
  227.          Height          =   255
  228.          Left            =   6420
  229.          TabIndex        =   12
  230.          Top             =   480
  231.          Width           =   540
  232.       End
  233.       Begin VB.Label Label1 
  234.          AutoSize        =   -1  'True
  235.          BackColor       =   &H00FFFF00&
  236.          BorderStyle     =   1  'Fixed Single
  237.          Caption         =   "File Name"
  238.          Height          =   255
  239.          Left            =   60
  240.          TabIndex        =   11
  241.          Top             =   120
  242.          Width           =   765
  243.       End
  244.       Begin VB.Label Label4 
  245.          BackColor       =   &H00FFFFFF&
  246.          BorderStyle     =   1  'Fixed Single
  247.          Height          =   255
  248.          Left            =   840
  249.          TabIndex        =   5
  250.          Top             =   120
  251.          Width           =   6135
  252.       End
  253.    End
  254. End
  255. Attribute VB_Name = "Animgif_Demo"
  256. Attribute VB_GlobalNameSpace = False
  257. Attribute VB_Creatable = False
  258. Attribute VB_PredeclaredId = True
  259. Attribute VB_Exposed = False
  260.  
  261. Dim f
  262.  
  263. Private Sub ani_gifdemo1_Click()
  264. MsgBox Ani_GifDemo1.Maxframe 'End
  265. End Sub
  266.  
  267. Private Sub ani_gifdemo1_FrameChange(framenumber As Long)
  268. Label3 = framenumber
  269. Label3.Refresh
  270. End Sub
  271.  
  272. Private Sub Check1_Click()
  273.  
  274. Ani_GifDemo1.Appearance = Check1.Value
  275.  
  276. End Sub
  277.  
  278. Private Sub Check2_Click()
  279. Ani_GifDemo1.BorderStyle = Check2.Value
  280. End Sub
  281.  
  282. Private Sub Check3_Click()
  283. If Check3.Value = 0 Then Ani_GifDemo1.Visible = False Else Ani_GifDemo1.Visible = True
  284. End Sub
  285.  
  286. Private Sub Check4_Click()
  287. Ani_GifDemo1.checkonly = Check4.Value
  288. Check3.Value = 1 - Check4.Value
  289. End Sub
  290.  
  291. Private Sub Command1_Click()
  292. Ani_GifDemo1.Play 1
  293.  
  294. End Sub
  295.  
  296. Private Sub Command2_Click()
  297. Ani_GifDemo1.pause
  298. End Sub
  299.  
  300. Private Sub Command3_Click()
  301. Ani_GifDemo1.Play
  302. End Sub
  303.  
  304. Private Sub Command4_Click()
  305. Ani_GifDemo1.Play -2
  306. End Sub
  307.  
  308.  
  309.  
  310. Private Sub Dir1_Change()
  311. File1.Path = Dir1.Path
  312. End Sub
  313.  
  314. Private Sub File1_Click()
  315. Label4 = File1.Path + "\" + File1.FileName
  316. Label8 = "Loading"
  317. Ani_GifDemo1.File_Name = Label4
  318. Label8 = "Ready"
  319. Label5 = Ani_GifDemo1.isanimated
  320. Command1.Enabled = Ani_GifDemo1.isanimated
  321. Command2.Enabled = Ani_GifDemo1.isanimated
  322. Command3.Enabled = Ani_GifDemo1.isanimated
  323. Command4.Enabled = Ani_GifDemo1.isanimated
  324. HScroll2.Enabled = Ani_GifDemo1.isanimated
  325. Frame2.Enabled = Ani_GifDemo1.isanimated
  326.  
  327. End Sub
  328.  
  329. Private Sub Form_Load()
  330.  
  331.  
  332. Dir1.Path = App.Path
  333. End Sub
  334.  
  335. Private Sub HScroll1_Change()
  336. Ani_GifDemo1.Left = HScroll1
  337. End Sub
  338.  
  339. Private Sub HScroll1_Scroll()
  340. Ani_GifDemo1.Left = HScroll1
  341. End Sub
  342.  
  343.  
  344.  
  345.  
  346.  
  347. Private Sub HScroll2_Change()
  348. Ani_GifDemo1.Speed_adjust = HScroll2
  349. Frame2.Caption = "Speed Adjust " & HScroll2 & "%"
  350. End Sub
  351.  
  352. Private Sub HScroll2_Scroll()
  353. Ani_GifDemo1.Speed_adjust = HScroll2
  354. Frame2.Caption = "Speed Adjust " & HScroll2 & "%"
  355. End Sub
  356.  
  357.  
  358.