home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / pic_butn / picbutns.frm < prev    next >
Text File  |  1993-05-04  |  4KB  |  143 lines

  1. VERSION 2.00
  2. Begin Form PicButtons 
  3.    Caption         =   "Pic Buttons"
  4.    Height          =   2055
  5.    Left            =   1215
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   1560
  8.    ScaleWidth      =   2940
  9.    Top             =   2445
  10.    Width           =   3150
  11.    Begin PictureBox ButnPic 
  12.       AutoSize        =   -1  'True
  13.       BorderStyle     =   0  'None
  14.       Height          =   330
  15.       Index           =   2
  16.       Left            =   1740
  17.       ScaleHeight     =   330
  18.       ScaleWidth      =   360
  19.       TabIndex        =   3
  20.       Top             =   180
  21.       Width           =   360
  22.    End
  23.    Begin PictureBox ButnPic 
  24.       AutoSize        =   -1  'True
  25.       BorderStyle     =   0  'None
  26.       Height          =   330
  27.       Index           =   1
  28.       Left            =   1020
  29.       ScaleHeight     =   330
  30.       ScaleWidth      =   360
  31.       TabIndex        =   2
  32.       Top             =   180
  33.       Width           =   360
  34.    End
  35.    Begin PictureBox Picture3 
  36.       AutoSize        =   -1  'True
  37.       BackColor       =   &H00C0C0C0&
  38.       BorderStyle     =   0  'None
  39.       Height          =   330
  40.       Left            =   600
  41.       Picture         =   PICBUTNS.FRX:0000
  42.       ScaleHeight     =   330
  43.       ScaleWidth      =   360
  44.       TabIndex        =   1
  45.       Top             =   900
  46.       Width           =   360
  47.    End
  48.    Begin PictureBox ButnPic 
  49.       AutoSize        =   -1  'True
  50.       BorderStyle     =   0  'None
  51.       Height          =   330
  52.       Index           =   0
  53.       Left            =   300
  54.       ScaleHeight     =   330
  55.       ScaleWidth      =   360
  56.       TabIndex        =   0
  57.       Top             =   180
  58.       Width           =   360
  59.    End
  60.    Begin PictureClip PicClip1 
  61.       Cols            =   20
  62.       Location        =   "7200,3300,1020,2100"
  63.       Picture         =   PICBUTNS.FRX:0182
  64.       Rows            =   10
  65.    End
  66. End
  67.  
  68. Sub ButnPic_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  69.      Select Case Button
  70.       Case 0
  71.            ButnPic(0).Picture = PicClip1.GraphicCell(0 + 10)
  72.            ' your code or subroutine call goes here
  73.       Case 1
  74.            ButnPic(1).Picture = PicClip1.GraphicCell(1 + 10)
  75.            ' your code or subroutine call goes here
  76.       Case 2
  77.            ButnPic(1).Picture = PicClip1.GraphicCell(3 + 10)
  78.            ' your code or subroutine call goes here
  79.      End Select
  80.  
  81. End Sub
  82.  
  83. Sub ButnPic_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  84.      Select Case Button
  85.       Case 0
  86.            ButnPic(0).Picture = PicClip1.GraphicCell(0)
  87.       Case 1
  88.            ButnPic(1).Picture = PicClip1.GraphicCell(1)
  89.       Case 2
  90.            ButnPic(1).Picture = PicClip1.GraphicCell(3)
  91.      End Select
  92.  
  93. End Sub
  94.  
  95. Sub Form_Load ()
  96.  
  97.      Get_Buttons
  98.  
  99. End Sub
  100.  
  101. Sub Get_Buttons ()
  102.      
  103.      picture0.Picture = PicClip1.GraphicCell(0)
  104.      picture1.Picture = PicClip1.GraphicCell(1)
  105.      picture2.Picture = PicClip1.GraphicCell(2)
  106.  
  107. End Sub
  108.  
  109. Sub Picture0_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  110.  
  111.      picture0.Picture = PicClip1.GraphicCell(0 + 10)
  112.  
  113. End Sub
  114.  
  115. Sub Picture0_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  116.  
  117.      picture0.Picture = PicClip1.GraphicCell(0)
  118.  
  119. End Sub
  120.  
  121. Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  122.      
  123.      picture1.Picture = PicClip1.GraphicCell(1 + 10)
  124.  
  125. End Sub
  126.  
  127. Sub Picture1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  128.      
  129.      picture1.Picture = PicClip1.GraphicCell(1)
  130.  
  131. End Sub
  132.  
  133. Sub Picture2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  134.      picture2.Picture = PicClip1.GraphicCell(2 + 10)
  135.  
  136. End Sub
  137.  
  138. Sub Picture2_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  139.      picture2.Picture = PicClip1.GraphicCell(2)
  140.  
  141. End Sub
  142.  
  143.