home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / ctdemo / ct_move.frm < prev    next >
Text File  |  1995-02-26  |  13KB  |  381 lines

  1. VERSION 2.00
  2. Begin Form w_move_demo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "ctMOVE (Animated Push Buttons) Demo"
  6.    ClientHeight    =   4440
  7.    ClientLeft      =   645
  8.    ClientTop       =   1470
  9.    ClientWidth     =   7485
  10.    Height          =   4965
  11.    Icon            =   CT_MOVE.FRX:0000
  12.    Left            =   585
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   4440
  17.    ScaleWidth      =   7485
  18.    Top             =   1005
  19.    Width           =   7605
  20.    Begin Frame Frame3 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Rotation Sequence"
  23.       ForeColor       =   &H00000000&
  24.       Height          =   2895
  25.       Left            =   300
  26.       TabIndex        =   15
  27.       Top             =   1080
  28.       Width           =   2115
  29.       Begin ctMOVE ctMove1 
  30.          Action          =   0
  31.          ActivePicture   =   1
  32.          BackColor       =   &H00FFFFFF&
  33.          BorderColor     =   &H00000000&
  34.          BorderType      =   0  'Regular
  35.          Caption         =   "Trash"
  36.          FontBold        =   0   'False
  37.          FontItalic      =   0   'False
  38.          FontName        =   "MS Sans Serif"
  39.          FontSize        =   9.75
  40.          FontStrikethru  =   0   'False
  41.          FontUnderline   =   0   'False
  42.          ForeColor       =   &H00800000&
  43.          Height          =   1005
  44.          KillTimer       =   0   'False
  45.          Left            =   240
  46.          MaximumCells    =   0
  47.          Offset          =   12
  48.          PicCols         =   6
  49.          PicRows         =   1
  50.          Picture         =   CT_MOVE.FRX:0302
  51.          RepeatRate      =   10
  52.          Sequence        =   ""
  53.          SequenceType    =   0  'Rotation
  54.          ShadowColor     =   &H00808080&
  55.          ShowFocus       =   0   'False
  56.          TabIndex        =   2
  57.          TextPosition    =   3  'Right
  58.          Top             =   1740
  59.          Width           =   1635
  60.       End
  61.       Begin ctMOVE ctbook 
  62.          Action          =   0
  63.          ActivePicture   =   1
  64.          BackColor       =   &H00FFFFFF&
  65.          BorderColor     =   &H00000000&
  66.          BorderType      =   0  'Regular
  67.          Caption         =   "Turn the Page"
  68.          ForeColor       =   &H00000000&
  69.          Height          =   1155
  70.          KillTimer       =   0   'False
  71.          Left            =   240
  72.          MaximumCells    =   0
  73.          Offset          =   10
  74.          PicCols         =   3
  75.          PicRows         =   2
  76.          Picture         =   CT_MOVE.FRX:1198
  77.          RepeatRate      =   10
  78.          Sequence        =   ""
  79.          SequenceType    =   0  'Rotation
  80.          ShadowColor     =   &H00808080&
  81.          ShowFocus       =   -1  'True
  82.          TabIndex        =   16
  83.          TextPosition    =   0  'Bottom
  84.          Top             =   480
  85.          Width           =   1635
  86.       End
  87.    End
  88.    Begin Frame Frame2 
  89.       BackColor       =   &H00C0C0C0&
  90.       Caption         =   "Back and Forth"
  91.       ForeColor       =   &H00000000&
  92.       Height          =   1875
  93.       Left            =   2640
  94.       TabIndex        =   13
  95.       Top             =   1080
  96.       Width           =   2235
  97.       Begin ctMOVE ctThumb 
  98.          Action          =   0
  99.          ActivePicture   =   1
  100.          BackColor       =   &H00E0FFFF&
  101.          BorderColor     =   &H00000000&
  102.          BorderType      =   2  'Raised
  103.          Caption         =   "Thumb Screw"
  104.          FontBold        =   -1  'True
  105.          FontItalic      =   0   'False
  106.          FontName        =   "Times New Roman"
  107.          FontSize        =   13.5
  108.          FontStrikethru  =   0   'False
  109.          FontUnderline   =   0   'False
  110.          ForeColor       =   &H00800000&
  111.          Height          =   1155
  112.          KillTimer       =   0   'False
  113.          Left            =   180
  114.          MaximumCells    =   0
  115.          Offset          =   5
  116.          PicCols         =   4
  117.          PicRows         =   4
  118.          Picture         =   CT_MOVE.FRX:1B12
  119.          RepeatRate      =   20
  120.          Sequence        =   ""
  121.          SequenceType    =   1  'Back and Forth
  122.          ShadowColor     =   &H00808080&
  123.          ShowFocus       =   -1  'True
  124.          TabIndex        =   14
  125.          TextPosition    =   0  'Bottom
  126.          Top             =   540
  127.          Width           =   1875
  128.       End
  129.    End
  130.    Begin Frame Frame1 
  131.       BackColor       =   &H00C0C0C0&
  132.       Caption         =   "User Defined"
  133.       DragIcon        =   CT_MOVE.FRX:3F8C
  134.       ForeColor       =   &H00000000&
  135.       Height          =   2865
  136.       Left            =   5160
  137.       TabIndex        =   4
  138.       Top             =   1080
  139.       Width           =   2115
  140.       Begin CommandButton Command3 
  141.          Caption         =   "C"
  142.          FontBold        =   0   'False
  143.          FontItalic      =   0   'False
  144.          FontName        =   "MS Sans Serif"
  145.          FontSize        =   8.25
  146.          FontStrikethru  =   0   'False
  147.          FontUnderline   =   0   'False
  148.          Height          =   345
  149.          Left            =   1560
  150.          TabIndex        =   12
  151.          Top             =   2400
  152.          Width           =   375
  153.       End
  154.       Begin CommandButton Command2 
  155.          Caption         =   "B"
  156.          FontBold        =   0   'False
  157.          FontItalic      =   0   'False
  158.          FontName        =   "MS Sans Serif"
  159.          FontSize        =   8.25
  160.          FontStrikethru  =   0   'False
  161.          FontUnderline   =   0   'False
  162.          Height          =   345
  163.          Left            =   900
  164.          TabIndex        =   11
  165.          Top             =   2400
  166.          Width           =   375
  167.       End
  168.       Begin CommandButton Command1 
  169.          Caption         =   "A"
  170.          FontBold        =   0   'False
  171.          FontItalic      =   0   'False
  172.          FontName        =   "MS Sans Serif"
  173.          FontSize        =   8.25
  174.          FontStrikethru  =   0   'False
  175.          FontUnderline   =   0   'False
  176.          Height          =   345
  177.          Left            =   240
  178.          TabIndex        =   10
  179.          Top             =   2400
  180.          Width           =   375
  181.       End
  182.       Begin ctMOVE ctMove_mail 
  183.          Action          =   0
  184.          ActivePicture   =   1
  185.          BackColor       =   &H00C0C0C0&
  186.          BorderColor     =   &H00000000&
  187.          BorderType      =   0  'Regular
  188.          Caption         =   "Send Mail"
  189.          FontBold        =   0   'False
  190.          FontItalic      =   0   'False
  191.          FontName        =   "MS Sans Serif"
  192.          FontSize        =   8.25
  193.          FontStrikethru  =   0   'False
  194.          FontUnderline   =   0   'False
  195.          ForeColor       =   &H00000000&
  196.          Height          =   1005
  197.          KillTimer       =   0   'False
  198.          Left            =   300
  199.          MaximumCells    =   0
  200.          Offset          =   6
  201.          PicCols         =   3
  202.          PicRows         =   5
  203.          Picture         =   CT_MOVE.FRX:428E
  204.          RepeatRate      =   8
  205.          Sequence        =   "1,4,1"
  206.          SequenceType    =   2  'User Defined
  207.          ShadowColor     =   &H00808080&
  208.          ShowFocus       =   -1  'True
  209.          TabIndex        =   8
  210.          TextPosition    =   0  'Bottom
  211.          Top             =   960
  212.          Width           =   1545
  213.       End
  214.       Begin ctCLIP ctClip3 
  215.          ActivePicture   =   1
  216.          BackColor       =   &H00FFFFFF&
  217.          BorderColor     =   &H00000000&
  218.          BorderType      =   1  'None
  219.          DragIcon        =   CT_MOVE.FRX:6A68
  220.          DragMode        =   1  'Automatic
  221.          Height          =   390
  222.          Left            =   1500
  223.          PicCols         =   2
  224.          PicRows         =   1
  225.          Picture         =   CT_MOVE.FRX:6D6A
  226.          RepeatRate      =   0
  227.          ShadowColor     =   &H00808080&
  228.          TabIndex        =   7
  229.          Tag             =   "Click and Drag to Trash"
  230.          Top             =   420
  231.          Width           =   360
  232.       End
  233.       Begin ctCLIP ctClip2 
  234.          ActivePicture   =   1
  235.          BackColor       =   &H00FFFFFF&
  236.          BorderColor     =   &H00000000&
  237.          BorderType      =   1  'None
  238.          DragIcon        =   CT_MOVE.FRX:7054
  239.          DragMode        =   1  'Automatic
  240.          Height          =   390
  241.          Left            =   900
  242.          PicCols         =   2
  243.          PicRows         =   1
  244.          Picture         =   CT_MOVE.FRX:7356
  245.          RepeatRate      =   0
  246.          ShadowColor     =   &H00808080&
  247.          TabIndex        =   6
  248.          Tag             =   "Click and Drag to Trash"
  249.          Top             =   420
  250.          Width           =   360
  251.       End
  252.       Begin ctCLIP ctClip1 
  253.          ActivePicture   =   1
  254.          BackColor       =   &H00FFFFFF&
  255.          BorderColor     =   &H00000000&
  256.          BorderType      =   1  'None
  257.          DragIcon        =   CT_MOVE.FRX:7640
  258.          DragMode        =   1  'Automatic
  259.          Height          =   390
  260.          Left            =   300
  261.          PicCols         =   2
  262.          PicRows         =   1
  263.          Picture         =   CT_MOVE.FRX:7942
  264.          RepeatRate      =   0
  265.          ShadowColor     =   &H00808080&
  266.          TabIndex        =   5
  267.          Tag             =   "Click and Drag to Trash"
  268.          Top             =   420
  269.          Width           =   360
  270.       End
  271.       Begin Label Label2 
  272.          Alignment       =   2  'Center
  273.          BackColor       =   &H00C0C0C0&
  274.          Caption         =   "Send To"
  275.          FontBold        =   0   'False
  276.          FontItalic      =   0   'False
  277.          FontName        =   "MS Sans Serif"
  278.          FontSize        =   8.25
  279.          FontStrikethru  =   0   'False
  280.          FontUnderline   =   0   'False
  281.          Height          =   195
  282.          Left            =   540
  283.          TabIndex        =   9
  284.          Top             =   2130
  285.          Width           =   1155
  286.       End
  287.    End
  288.    Begin CommandButton bt_exit 
  289.       Caption         =   "E&xit"
  290.       Height          =   375
  291.       Left            =   3300
  292.       TabIndex        =   0
  293.       Top             =   3900
  294.       Width           =   915
  295.    End
  296.    Begin Label Label3 
  297.       Alignment       =   2  'Center
  298.       BackColor       =   &H00C0C0C0&
  299.       Caption         =   "Click on Any Image or Click and Drag A Mail Box into the Garbage Can"
  300.       FontBold        =   0   'False
  301.       FontItalic      =   0   'False
  302.       FontName        =   "MS Sans Serif"
  303.       FontSize        =   8.25
  304.       FontStrikethru  =   0   'False
  305.       FontUnderline   =   0   'False
  306.       ForeColor       =   &H00800000&
  307.       Height          =   675
  308.       Left            =   2700
  309.       TabIndex        =   3
  310.       Top             =   3120
  311.       Width           =   2055
  312.    End
  313.    Begin Label Label1 
  314.       Alignment       =   2  'Center
  315.       BackStyle       =   0  'Transparent
  316.       Caption         =   "ctMove is a custom control that will allow the programmer to assign a series of bitmap images to the control and then have those images played back when the control is clicked."
  317.       ForeColor       =   &H00800000&
  318.       Height          =   675
  319.       Left            =   240
  320.       TabIndex        =   1
  321.       Top             =   180
  322.       Width           =   7095
  323.    End
  324. End
  325. Dim nCrntMail As Integer
  326.  
  327.  
  328. Sub bt_exit_Click ()
  329.   Unload w_move_demo
  330. End Sub
  331.  
  332. Sub Command1_Click ()
  333.    nCrntMail = 1
  334.    ctmove_mail.Sequence = "1,4,3,6,9,12,1"
  335. End Sub
  336.  
  337. Sub Command2_Click ()
  338.    nCrntMail = 2
  339.    ctmove_mail.Sequence = "1,4,7,10,1"
  340. End Sub
  341.  
  342. Sub Command3_Click ()
  343.    nCrntMail = 3
  344.    ctmove_mail.Sequence = "1,4,2,5,8,11,1"
  345. End Sub
  346.  
  347. Sub ctMove_mail_EndSequence ()
  348.    If (nCrntMail = 1) Then
  349.       ctClip1 = 2
  350.    ElseIf (nCrntMail = 2) Then
  351.       ctClip2 = 2
  352.    ElseIf (nCrntMail = 3) Then
  353.       ctClip3 = 2
  354.    End If
  355. End Sub
  356.  
  357. Sub ctMove1_DragDrop (Source As Control, X As Single, Y As Single)
  358.    ctMove1.Action = 1
  359.  
  360.    If Source = ctClip1 Then
  361.       ctClip1.ActivePicture = 1
  362.    ElseIf Source = ctClip2 Then
  363.       ctClip2.ActivePicture = 1
  364.    ElseIf Source = ctClip3 Then
  365.       ctClip3.ActivePicture = 1
  366.    End If
  367. End Sub
  368.  
  369. Sub Form_Load ()
  370.    ' Center the window on the screen
  371.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .25
  372.  
  373.    w_mdi_main.bt_move = BUTTON_DISABLE
  374.    nCrntMail = 0
  375. End Sub
  376.  
  377. Sub Form_Unload (Cancel As Integer)
  378.    w_mdi_main.bt_move = BUTTON_UP
  379. End Sub
  380.  
  381.