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

  1. VERSION 2.00
  2. Begin Form w_clip_demo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "ctCLIP Demo"
  6.    ClientHeight    =   4605
  7.    ClientLeft      =   1035
  8.    ClientTop       =   2055
  9.    ClientWidth     =   7365
  10.    Height          =   5130
  11.    Icon            =   CT_CLIP.FRX:0000
  12.    Left            =   975
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   4605
  17.    ScaleWidth      =   7365
  18.    Top             =   1590
  19.    Width           =   7485
  20.    Begin Frame Frame3 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Animation"
  23.       ForeColor       =   &H00000000&
  24.       Height          =   2835
  25.       Left            =   300
  26.       TabIndex        =   14
  27.       Top             =   1560
  28.       Width           =   1995
  29.       Begin ctCLIP thumb 
  30.          ActivePicture   =   1
  31.          BackColor       =   &H00FFFFFF&
  32.          BorderColor     =   &H00000000&
  33.          BorderType      =   2  'Raised
  34.          Height          =   600
  35.          Left            =   720
  36.          PicCols         =   4
  37.          PicRows         =   4
  38.          Picture         =   CT_CLIP.FRX:0302
  39.          RepeatRate      =   20
  40.          ShadowColor     =   &H00808080&
  41.          TabIndex        =   3
  42.          Top             =   480
  43.          Width           =   540
  44.       End
  45.       Begin Label Label3 
  46.          Alignment       =   2  'Center
  47.          BackColor       =   &H00C0C0C0&
  48.          Caption         =   "Click on the picture and continue to hold down the left button."
  49.          FontBold        =   0   'False
  50.          FontItalic      =   0   'False
  51.          FontName        =   "MS Sans Serif"
  52.          FontSize        =   8.25
  53.          FontStrikethru  =   0   'False
  54.          FontUnderline   =   0   'False
  55.          ForeColor       =   &H00000000&
  56.          Height          =   765
  57.          Left            =   300
  58.          TabIndex        =   4
  59.          Top             =   1440
  60.          Width           =   1395
  61.       End
  62.    End
  63.    Begin Frame Frame2 
  64.       BackColor       =   &H00C0C0C0&
  65.       Caption         =   "Buttons"
  66.       ForeColor       =   &H00000000&
  67.       Height          =   2835
  68.       Left            =   2580
  69.       TabIndex        =   10
  70.       Top             =   1560
  71.       Width           =   2355
  72.       Begin PictureBox Picture1 
  73.          BackColor       =   &H00C0C0C0&
  74.          BorderStyle     =   0  'None
  75.          Height          =   1125
  76.          Left            =   240
  77.          Picture         =   CT_CLIP.FRX:277C
  78.          ScaleHeight     =   1125
  79.          ScaleWidth      =   1875
  80.          TabIndex        =   13
  81.          Top             =   1560
  82.          Width           =   1875
  83.       End
  84.       Begin ctCLIP nPic 
  85.          ActivePicture   =   1
  86.          BackColor       =   &H00FFFFFF&
  87.          BorderColor     =   &H00000000&
  88.          BorderType      =   1  'None
  89.          Height          =   270
  90.          Left            =   1020
  91.          PicCols         =   6
  92.          PicRows         =   4
  93.          Picture         =   CT_CLIP.FRX:38D6
  94.          RepeatRate      =   0
  95.          ShadowColor     =   &H00808080&
  96.          TabIndex        =   11
  97.          Top             =   300
  98.          Width           =   300
  99.       End
  100.       Begin Label Label4 
  101.          Alignment       =   2  'Center
  102.          BackColor       =   &H00C0C0C0&
  103.          Caption         =   "This push button contains 24 different images. The entire bitmap is located below."
  104.          FontBold        =   0   'False
  105.          FontItalic      =   0   'False
  106.          FontName        =   "MS Sans Serif"
  107.          FontSize        =   8.25
  108.          FontStrikethru  =   0   'False
  109.          FontUnderline   =   0   'False
  110.          ForeColor       =   &H00000000&
  111.          Height          =   645
  112.          Left            =   120
  113.          TabIndex        =   12
  114.          Top             =   780
  115.          Width           =   2115
  116.       End
  117.    End
  118.    Begin Frame Frame1 
  119.       BackColor       =   &H00C0C0C0&
  120.       Caption         =   "General Pictures"
  121.       ForeColor       =   &H00000000&
  122.       Height          =   2355
  123.       Left            =   5220
  124.       TabIndex        =   5
  125.       Top             =   1560
  126.       Width           =   1935
  127.       Begin CommandButton Command4 
  128.          Caption         =   "Picture #3"
  129.          FontBold        =   0   'False
  130.          FontItalic      =   0   'False
  131.          FontName        =   "MS Sans Serif"
  132.          FontSize        =   8.25
  133.          FontStrikethru  =   0   'False
  134.          FontUnderline   =   0   'False
  135.          Height          =   345
  136.          Left            =   240
  137.          TabIndex        =   9
  138.          Top             =   1920
  139.          Width           =   1455
  140.       End
  141.       Begin CommandButton Command3 
  142.          Caption         =   "Picture #2"
  143.          FontBold        =   0   'False
  144.          FontItalic      =   0   'False
  145.          FontName        =   "MS Sans Serif"
  146.          FontSize        =   8.25
  147.          FontStrikethru  =   0   'False
  148.          FontUnderline   =   0   'False
  149.          Height          =   345
  150.          Left            =   240
  151.          TabIndex        =   8
  152.          Top             =   1500
  153.          Width           =   1455
  154.       End
  155.       Begin CommandButton Command2 
  156.          Caption         =   "Picture #1"
  157.          FontBold        =   0   'False
  158.          FontItalic      =   0   'False
  159.          FontName        =   "MS Sans Serif"
  160.          FontSize        =   8.25
  161.          FontStrikethru  =   0   'False
  162.          FontUnderline   =   0   'False
  163.          Height          =   345
  164.          Left            =   240
  165.          TabIndex        =   7
  166.          Top             =   1080
  167.          Width           =   1455
  168.       End
  169.       Begin ctCLIP ctSlot 
  170.          ActivePicture   =   1
  171.          BackColor       =   &H00FFFFFF&
  172.          BorderColor     =   &H00000000&
  173.          BorderType      =   3  'Lowered
  174.          Height          =   540
  175.          Left            =   660
  176.          PicCols         =   3
  177.          PicRows         =   1
  178.          Picture         =   CT_CLIP.FRX:4A30
  179.          RepeatRate      =   0
  180.          ShadowColor     =   &H00808080&
  181.          TabIndex        =   6
  182.          Top             =   420
  183.          Width           =   540
  184.       End
  185.    End
  186.    Begin CommandButton Command1 
  187.       Caption         =   "E&xit"
  188.       Height          =   375
  189.       Left            =   6240
  190.       TabIndex        =   0
  191.       Top             =   4110
  192.       Width           =   915
  193.    End
  194.    Begin Label Label2 
  195.       Alignment       =   2  'Center
  196.       BackColor       =   &H00C0C0C0&
  197.       Caption         =   "This can be very useful when you want to create animated objects, buttons with a variety of different faces, or display some type of picture that can have its image easily changed."
  198.       FontBold        =   -1  'True
  199.       FontItalic      =   0   'False
  200.       FontName        =   "Arial"
  201.       FontSize        =   9.75
  202.       FontStrikethru  =   0   'False
  203.       FontUnderline   =   0   'False
  204.       ForeColor       =   &H00800000&
  205.       Height          =   735
  206.       Left            =   120
  207.       TabIndex        =   2
  208.       Top             =   660
  209.       Width           =   7095
  210.    End
  211.    Begin Label Label1 
  212.       Alignment       =   2  'Center
  213.       BackColor       =   &H00C0C0C0&
  214.       Caption         =   "The ctCLIP VBX is a custom control that uses one large bitmap image but is able to only display a piece of it at a time."
  215.       FontBold        =   -1  'True
  216.       FontItalic      =   0   'False
  217.       FontName        =   "Arial"
  218.       FontSize        =   9.75
  219.       FontStrikethru  =   0   'False
  220.       FontUnderline   =   0   'False
  221.       ForeColor       =   &H00800000&
  222.       Height          =   645
  223.       Left            =   240
  224.       TabIndex        =   1
  225.       Top             =   120
  226.       Width           =   6975
  227.    End
  228. End
  229. Dim nActive As Integer
  230.  
  231. Sub Command1_Click ()
  232.    Unload w_clip_demo
  233. End Sub
  234.  
  235. Sub Command2_Click ()
  236.    ctSlot = 1
  237. End Sub
  238.  
  239. Sub Command3_Click ()
  240.    ctSlot = 2
  241. End Sub
  242.  
  243. Sub Command4_Click ()
  244.    ctSlot = 3
  245. End Sub
  246.  
  247. Sub Form_Load ()
  248.    ' Center the window on the screen
  249.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .25
  250.  
  251.    w_mdi_main.bt_clip = BUTTON_DISABLE
  252.    nActive = 1
  253. End Sub
  254.  
  255. Sub Form_Unload (Cancel As Integer)
  256.    w_mdi_main.bt_clip = BUTTON_UP
  257. End Sub
  258.  
  259. Sub nPic_Click ()
  260.    If nActive >= 12 Then
  261.       nActive = 1
  262.    Else
  263.       nActive = nActive + 1
  264.    End If
  265.    nPic = nActive
  266. End Sub
  267.  
  268. Sub nPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  269.    If (nPic <= 12) Then
  270.       nPic = nPic + 12
  271.    End If
  272. End Sub
  273.  
  274. Sub nPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  275.    If (Button = 1) Then
  276.       If X <= 0 Or X > nPic.Width Or Y < 0 Or Y > nPic.Height Then
  277.          If (nPic > 12) Then
  278.             nPic = nPic - 12
  279.          End If
  280.       Else
  281.          If (nPic <= 12) Then
  282.             nPic = nPic + 12
  283.          End If
  284.       End If
  285.    End If
  286. End Sub
  287.  
  288. Sub nPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  289.    If (nPic > 12) Then
  290.       nPic = nPic - 12
  291.    End If
  292.  
  293. End Sub
  294.  
  295. Sub thumb_Click ()
  296.    If (thumb = 16) Then
  297.       thumb = 1
  298.    Else
  299.       thumb = thumb + 1
  300.    End If
  301. End Sub
  302.  
  303.