home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / activex / demos / oletrial / samples / vb / mhanim / mhan200.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-10  |  15.6 KB  |  486 lines

  1. VERSION 4.00
  2. Begin VB.Form fMhan200 
  3.    Caption         =   "MhAnimate Example"
  4.    ClientHeight    =   4515
  5.    ClientLeft      =   1245
  6.    ClientTop       =   1920
  7.    ClientWidth     =   7365
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   0
  11.       weight          =   700
  12.       size            =   8.25
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    ForeColor       =   &H80000008&
  18.    Height          =   5205
  19.    Left            =   1185
  20.    LinkTopic       =   "Form1"
  21.    ScaleHeight     =   4515
  22.    ScaleWidth      =   7365
  23.    Top             =   1290
  24.    Width           =   7485
  25.    Begin VB.PictureBox picStatus 
  26.       Align           =   2  'Align Bottom
  27.       BeginProperty Font 
  28.          name            =   "MS Sans Serif"
  29.          charset         =   0
  30.          weight          =   700
  31.          size            =   8.25
  32.          underline       =   0   'False
  33.          italic          =   0   'False
  34.          strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   315
  37.       Left            =   0
  38.       ScaleHeight     =   255
  39.       ScaleWidth      =   7305
  40.       TabIndex        =   5
  41.       Top             =   4200
  42.       Width           =   7365
  43.    End
  44.    Begin VB.PictureBox Picture1 
  45.       Appearance      =   0  'Flat
  46.       BackColor       =   &H80000005&
  47.       BeginProperty Font 
  48.          name            =   "MS Sans Serif"
  49.          charset         =   0
  50.          weight          =   700
  51.          size            =   8.25
  52.          underline       =   0   'False
  53.          italic          =   0   'False
  54.          strikethrough   =   0   'False
  55.       EndProperty
  56.       ForeColor       =   &H80000008&
  57.       Height          =   1215
  58.       Index           =   0
  59.       Left            =   120
  60.       Picture         =   "Mhan200.frx":0000
  61.       ScaleHeight     =   1185
  62.       ScaleWidth      =   1185
  63.       TabIndex        =   4
  64.       Top             =   2880
  65.       Visible         =   0   'False
  66.       Width           =   1215
  67.    End
  68.    Begin VB.PictureBox Picture1 
  69.       Appearance      =   0  'Flat
  70.       BackColor       =   &H80000005&
  71.       BeginProperty Font 
  72.          name            =   "MS Sans Serif"
  73.          charset         =   0
  74.          weight          =   700
  75.          size            =   8.25
  76.          underline       =   0   'False
  77.          italic          =   0   'False
  78.          strikethrough   =   0   'False
  79.       EndProperty
  80.       ForeColor       =   &H80000008&
  81.       Height          =   1215
  82.       Index           =   1
  83.       Left            =   1440
  84.       Picture         =   "Mhan200.frx":24BA
  85.       ScaleHeight     =   1185
  86.       ScaleWidth      =   1185
  87.       TabIndex        =   3
  88.       Top             =   2880
  89.       Visible         =   0   'False
  90.       Width           =   1215
  91.    End
  92.    Begin VB.PictureBox Picture1 
  93.       Appearance      =   0  'Flat
  94.       BackColor       =   &H80000005&
  95.       BeginProperty Font 
  96.          name            =   "MS Sans Serif"
  97.          charset         =   0
  98.          weight          =   700
  99.          size            =   8.25
  100.          underline       =   0   'False
  101.          italic          =   0   'False
  102.          strikethrough   =   0   'False
  103.       EndProperty
  104.       ForeColor       =   &H80000008&
  105.       Height          =   1215
  106.       Index           =   2
  107.       Left            =   2760
  108.       Picture         =   "Mhan200.frx":4974
  109.       ScaleHeight     =   1185
  110.       ScaleWidth      =   1185
  111.       TabIndex        =   2
  112.       Top             =   2880
  113.       Visible         =   0   'False
  114.       Width           =   1215
  115.    End
  116.    Begin VB.PictureBox Picture1 
  117.       Appearance      =   0  'Flat
  118.       BackColor       =   &H80000005&
  119.       BeginProperty Font 
  120.          name            =   "MS Sans Serif"
  121.          charset         =   0
  122.          weight          =   700
  123.          size            =   8.25
  124.          underline       =   0   'False
  125.          italic          =   0   'False
  126.          strikethrough   =   0   'False
  127.       EndProperty
  128.       ForeColor       =   &H80000008&
  129.       Height          =   1215
  130.       Index           =   3
  131.       Left            =   4080
  132.       Picture         =   "Mhan200.frx":6E2E
  133.       ScaleHeight     =   1185
  134.       ScaleWidth      =   1185
  135.       TabIndex        =   1
  136.       Top             =   2880
  137.       Visible         =   0   'False
  138.       Width           =   1215
  139.    End
  140.    Begin VB.PictureBox Picture1 
  141.       Appearance      =   0  'Flat
  142.       BackColor       =   &H80000005&
  143.       BeginProperty Font 
  144.          name            =   "MS Sans Serif"
  145.          charset         =   0
  146.          weight          =   700
  147.          size            =   8.25
  148.          underline       =   0   'False
  149.          italic          =   0   'False
  150.          strikethrough   =   0   'False
  151.       EndProperty
  152.       ForeColor       =   &H80000008&
  153.       Height          =   1215
  154.       Index           =   4
  155.       Left            =   5400
  156.       Picture         =   "Mhan200.frx":92E8
  157.       ScaleHeight     =   1185
  158.       ScaleWidth      =   1185
  159.       TabIndex        =   0
  160.       Top             =   2880
  161.       Visible         =   0   'False
  162.       Width           =   1215
  163.    End
  164.    Begin Mhan200Lib.MhAnimat MhAnimat1 
  165.       Height          =   2655
  166.       Left            =   120
  167.       TabIndex        =   6
  168.       Top             =   120
  169.       Width           =   2535
  170.       _Version        =   65536
  171.       _ExtentX        =   4471
  172.       _ExtentY        =   4683
  173.       _StockProps     =   79
  174.       Caption         =   "Animated Picture Box"
  175.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  176.          name            =   "MS Sans Serif"
  177.          charset         =   0
  178.          weight          =   700
  179.          size            =   8.25
  180.          underline       =   0   'False
  181.          italic          =   0   'False
  182.          strikethrough   =   0   'False
  183.       EndProperty
  184.       TintColor       =   16711935
  185.       PictureUp       =   "Mhan200.frx":B7A2
  186.       Autosize        =   0   'False
  187.       Alignment       =   2
  188.       FontTransparent =   -1  'True
  189.       MultiLine       =   0   'False
  190.       Value           =   0
  191.       PictureTop      =   90
  192.       PictureLeft     =   390
  193.       PictureRight    =   345
  194.       PictureBottom   =   645
  195.       CaptionTop      =   2010
  196.       CaptionLeft     =   105
  197.       CaptionRight    =   105
  198.       CaptionBottom   =   150
  199.       BorderColor     =   -2147483642
  200.       LightColor      =   -2147483628
  201.       OuterFillColor  =   -2147483633
  202.       ShadowColor     =   -2147483632
  203.       Style           =   0
  204.       TextColor       =   -2147483630
  205.       TextFillColor   =   -2147483633
  206.       Pictures        =   4
  207.       Interval        =   800
  208.       Min             =   0
  209.       Max             =   4
  210.       PlayDirection   =   0
  211.       Play            =   1
  212.       AutoRepeat      =   -1  'True
  213.       WindowState     =   0
  214.       ColorDepth      =   0
  215.       FontStyle       =   0
  216.    End
  217.    Begin VB.Menu mnuAutoRepeat 
  218.       Caption         =   "AutoRepeat"
  219.    End
  220.    Begin VB.Menu mnuBorder 
  221.       Caption         =   "Border"
  222.       Begin VB.Menu mnuBorderColor 
  223.          Caption         =   "BorderColor"
  224.       End
  225.    End
  226.    Begin VB.Menu mnuCaption 
  227.       Caption         =   "Caption"
  228.       Begin VB.Menu mnuCaptionBottom 
  229.          Caption         =   "CaptionBottom"
  230.       End
  231.       Begin VB.Menu mnuCaptionLeft 
  232.          Caption         =   "CaptionLeft"
  233.       End
  234.       Begin VB.Menu mnuCaptionRight 
  235.          Caption         =   "CaptionRight"
  236.       End
  237.       Begin VB.Menu mnuCaptionTop 
  238.          Caption         =   "CaptionTop"
  239.       End
  240.    End
  241.    Begin VB.Menu mnuColor 
  242.       Caption         =   "Color"
  243.       Begin VB.Menu mnuColorDepth 
  244.          Caption         =   "ColorDepth"
  245.       End
  246.       Begin VB.Menu mnuLightColor 
  247.          Caption         =   "LightColor"
  248.       End
  249.       Begin VB.Menu mnuOuterFillColor 
  250.          Caption         =   "OuterFillColor"
  251.       End
  252.       Begin VB.Menu mnuShadowColor 
  253.          Caption         =   "ShadowColor"
  254.       End
  255.       Begin VB.Menu mnuTextColor 
  256.          Caption         =   "TextColor"
  257.       End
  258.    End
  259.    Begin VB.Menu mnuMiscellaneous 
  260.       Caption         =   "Miscellaneous"
  261.       Begin VB.Menu mnuFontStyle 
  262.          Caption         =   "FontStyle"
  263.       End
  264.       Begin VB.Menu mnuInterval 
  265.          Caption         =   "Interval"
  266.       End
  267.       Begin VB.Menu mnuMax 
  268.          Caption         =   "Max"
  269.       End
  270.       Begin VB.Menu mnuMin 
  271.          Caption         =   "Min"
  272.       End
  273.       Begin VB.Menu mnuMultiline 
  274.          Caption         =   "Multiline"
  275.       End
  276.       Begin VB.Menu mnuPlay 
  277.          Caption         =   "Play"
  278.       End
  279.       Begin VB.Menu mnuPlayDirection 
  280.          Caption         =   "PlayDirection"
  281.       End
  282.       Begin VB.Menu mnuValue 
  283.          Caption         =   "Value"
  284.       End
  285.    End
  286.    Begin VB.Menu mnuPictureProp 
  287.       Caption         =   "PictureProp"
  288.       Begin VB.Menu mnuPicture 
  289.          Caption         =   "Picture"
  290.       End
  291.       Begin VB.Menu mnuPictureBottom 
  292.          Caption         =   "PictureBottom"
  293.       End
  294.       Begin VB.Menu mnuPictureLeft 
  295.          Caption         =   "PictureLeft"
  296.       End
  297.       Begin VB.Menu mnuPictrureRight 
  298.          Caption         =   "PictrureRight"
  299.       End
  300.       Begin VB.Menu mnuPictures 
  301.          Caption         =   "Pictures"
  302.       End
  303.       Begin VB.Menu mnuPictureTop 
  304.          Caption         =   "PictureTop"
  305.       End
  306.    End
  307. Attribute VB_Name = "fMhan200"
  308. Attribute VB_Creatable = False
  309. Attribute VB_Exposed = False
  310. Private Sub Form_Load()
  311.     Me.Top = (Screen.Height - Me.Height) / 2
  312.     Me.Left = (Screen.Width - Me.Width) / 2
  313.     MhAnimat1.Picture(0) = Picture1(0).Picture
  314.     MhAnimat1.Picture(1) = Picture1(1).Picture
  315.     MhAnimat1.Picture(2) = Picture1(2).Picture
  316.     MhAnimat1.Picture(3) = Picture1(3).Picture
  317.     MhAnimat1.Picture(4) = Picture1(4).Picture
  318. End Sub
  319. Private Sub MhAnimat1_Change()
  320.     picStatus.Cls
  321.     picStatus.Print "Custom Event - MhAnimat1_Change"
  322.     If picStatus.ForeColor = &H800000 Then
  323.         picStatus.ForeColor = &H0&
  324.     Else
  325.         picStatus.ForeColor = &H800000
  326.     End If
  327. End Sub
  328. Private Sub MhAnimat1_PlayEnd()
  329.     picStatus.Cls
  330.     picStatus.Print "Custom Event - MhAnimat1_PlayEnd"
  331.     If picStatus.ForeColor = &H800000 Then
  332.         picStatus.ForeColor = &H0&
  333.     Else
  334.         picStatus.ForeColor = &H800000
  335.     End If
  336. End Sub
  337. Private Sub mnuAutoRepeat_Click()
  338.     ReDim sgOptionArray(0 To 1)
  339.     sgOptionArray(0) = "False"
  340.     sgOptionArray(1) = "True"
  341.     igOptionState = MhAnimat1.AutoRepeat
  342.     MhAnimat1.AutoRepeat = GetOption("AutoRepeat")
  343.     If MhAnimat1.AutoRepeat = 1 Then
  344.         MhAnimat1.Play = 1
  345.     End If
  346. End Sub
  347. Private Sub mnuBorderColor_Click()
  348.     ColorSelect.Show 1
  349.     MhAnimat1.BorderColor = lgCurrentColor
  350. End Sub
  351. Private Sub mnuCaptionBottom_Click()
  352.     igRangeArray(0) = 0
  353.     igRangeArray(1) = MhAnimat1.CaptionBottom
  354.     igRangeArray(2) = 200
  355.     MhAnimat1.CaptionBottom = GetRange("CaptionBottom")
  356. End Sub
  357. Private Sub mnuCaptionLeft_Click()
  358.     igRangeArray(0) = 0
  359.     igRangeArray(1) = MhAnimat1.CaptionLeft
  360.     igRangeArray(2) = MhAnimat1.CaptionRight
  361.     MhAnimat1.CaptionLeft = GetRange("CaptionLeft")
  362. End Sub
  363. Private Sub mnuCaptionRight_Click()
  364.     igRangeArray(0) = MhAnimat1.CaptionLeft
  365.     igRangeArray(1) = MhAnimat1.CaptionRight
  366.     igRangeArray(2) = 200
  367.     MhAnimat1.CaptionRight = GetRange("CaptionRight")
  368. End Sub
  369. Private Sub mnuCaptionTop_Click()
  370.     igRangeArray(0) = MhAnimat1.CaptionBottom
  371.     igRangeArray(1) = MhAnimat1.CaptionTop
  372.     igRangeArray(2) = 2050
  373.     MhAnimat1.CaptionTop = GetRange("CaptionTop")
  374. End Sub
  375. Private Sub mnuColorDepth_Click()
  376.     ReDim sgOptionArray(0 To 1)
  377.     sgOptionArray(0) = "16 Color"
  378.     sgOptionArray(1) = "256 Color"
  379.     igOptionState = MhAnimat1.ColorDepth
  380.     MhAnimat1.ColorDepth = GetOption("ColorDepth")
  381. End Sub
  382. Private Sub mnuFontStyle_Click()
  383.     ReDim sgOptionArray(0 To 4)
  384.     sgOptionArray(0) = "None"
  385.     sgOptionArray(1) = "Raised"
  386.     sgOptionArray(2) = "Raised with more shading"
  387.     sgOptionArray(3) = "Lowered"
  388.     sgOptionArray(4) = "Lowered with more shading"
  389.     igOptionState = MhAnimat1.FontStyle
  390.     MhAnimat1.FontStyle = GetOption("FontStyle")
  391. End Sub
  392. Private Sub mnuInterval_Click()
  393.     igRangeArray(0) = 500
  394.     igRangeArray(1) = MhAnimat1.Interval
  395.     igRangeArray(2) = 1500
  396.     MhAnimat1.Interval = GetRange("Interval")
  397. End Sub
  398. Private Sub mnuLightColor_Click()
  399.     ColorSelect.Show 1
  400.     MhAnimat1.LightColor = lgCurrentColor
  401. End Sub
  402. Private Sub mnuMax_Click()
  403.     igRangeArray(0) = MhAnimat1.Min
  404.     igRangeArray(1) = MhAnimat1.Max
  405.     igRangeArray(2) = 4
  406.     MhAnimat1.Max = GetRange("Max")
  407. End Sub
  408. Private Sub mnuMin_Click()
  409.     igRangeArray(0) = 0
  410.     igRangeArray(1) = MhAnimat1.Min
  411.     igRangeArray(2) = MhAnimat1.Max
  412.     MhAnimat1.Min = GetRange("Min")
  413. End Sub
  414. Private Sub mnuMultiline_Click()
  415.     ReDim sgOptionArray(0 To 1)
  416.     sgOptionArray(0) = "False"
  417.     sgOptionArray(1) = "True"
  418.     igOptionState = MhAnimat1.MultiLine
  419.     MhAnimat1.MultiLine = GetOption("Multiline")
  420. End Sub
  421. Private Sub mnuOuterFillColor_Click()
  422.     ColorSelect.Show 1
  423.     MhAnimat1.OuterFillColor = lgCurrentColor
  424. End Sub
  425. Private Sub mnuPictrureRight_Click()
  426.     igRangeArray(0) = MhAnimat1.PictureLeft
  427.     igRangeArray(1) = MhAnimat1.PictureRight
  428.     igRangeArray(2) = 400
  429.     MhAnimat1.PictureRight = GetRange("PictureRight")
  430. End Sub
  431. Private Sub mnuPicture_Click()
  432.     MsgBox "An array of pictures to show.  This example uses picture boxes as the source for pictures.", , ""
  433. End Sub
  434. Private Sub mnuPictureBottom_Click()
  435.     igRangeArray(0) = MhAnimat1.PictureTop
  436.     igRangeArray(1) = MhAnimat1.PictureBottom
  437.     igRangeArray(2) = 700
  438.     MhAnimat1.PictureBottom = GetRange("PictureBottom")
  439. End Sub
  440. Private Sub mnuPictureLeft_Click()
  441.     igRangeArray(0) = 0
  442.     igRangeArray(1) = MhAnimat1.PictureLeft
  443.     igRangeArray(2) = MhAnimat1.PictureRight
  444.     MhAnimat1.PictureLeft = GetRange("PictureLeft")
  445. End Sub
  446. Private Sub mnuPictures_Click()
  447.     igRangeArray(0) = 4
  448.     igRangeArray(1) = MhAnimat1.Pictures
  449.     igRangeArray(2) = 100
  450.     MhAnimat1.Pictures = GetRange("Pictures")
  451. End Sub
  452. Private Sub mnuPictureTop_Click()
  453.     igRangeArray(0) = 0
  454.     igRangeArray(1) = MhAnimat1.PictureTop
  455.     igRangeArray(2) = MhAnimat1.PictureBottom
  456.     MhAnimat1.PictureTop = GetRange("PictureTop")
  457. End Sub
  458. Private Sub mnuPlay_Click()
  459.     ReDim sgOptionArray(0 To 1)
  460.     sgOptionArray(0) = "Stop"
  461.     sgOptionArray(1) = "Start"
  462.     igOptionState = MhAnimat1.Play
  463.     MhAnimat1.Play = GetOption("Play")
  464. End Sub
  465. Private Sub mnuPlayDirection_Click()
  466.     ReDim sgOptionArray(0 To 1)
  467.     sgOptionArray(0) = ".Min to .Max"
  468.     sgOptionArray(1) = ".Max to .Min"
  469.     igOptionState = MhAnimat1.PlayDirection
  470.     MhAnimat1.PlayDirection = GetOption("PlayDirection")
  471. End Sub
  472. Private Sub mnuShadowColor_Click()
  473.     ColorSelect.Show 1
  474.     MhAnimat1.ShadowColor = lgCurrentColor
  475. End Sub
  476. Private Sub mnuTextColor_Click()
  477.     ColorSelect.Show 1
  478.     MhAnimat1.TextColor = lgCurrentColor
  479. End Sub
  480. Private Sub mnuValue_Click()
  481.     igRangeArray(0) = MhAnimat1.Min
  482.     igRangeArray(1) = MhAnimat1.Value
  483.     igRangeArray(2) = MhAnimat1.Max
  484.     MhAnimat1.Value = GetRange("Value")
  485. End Sub
  486.