home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / PIC_BUTN / PICBUTNS.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-05-04  |  3.9 KB  |  118 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. Sub ButnPic_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  67.      Select Case Button
  68.       Case 0
  69.            ButnPic(0).Picture = PicClip1.GraphicCell(0 + 10)
  70.            ' your code or subroutine call goes here
  71.       Case 1
  72.            ButnPic(1).Picture = PicClip1.GraphicCell(1 + 10)
  73.            ' your code or subroutine call goes here
  74.       Case 2
  75.            ButnPic(1).Picture = PicClip1.GraphicCell(3 + 10)
  76.            ' your code or subroutine call goes here
  77.      End Select
  78. End Sub
  79. Sub ButnPic_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  80.      Select Case Button
  81.       Case 0
  82.            ButnPic(0).Picture = PicClip1.GraphicCell(0)
  83.       Case 1
  84.            ButnPic(1).Picture = PicClip1.GraphicCell(1)
  85.       Case 2
  86.            ButnPic(1).Picture = PicClip1.GraphicCell(3)
  87.      End Select
  88. End Sub
  89. Sub Form_Load ()
  90.      Get_Buttons
  91. End Sub
  92. Sub Get_Buttons ()
  93.      
  94.      picture0.Picture = PicClip1.GraphicCell(0)
  95.      picture1.Picture = PicClip1.GraphicCell(1)
  96.      picture2.Picture = PicClip1.GraphicCell(2)
  97. End Sub
  98. Sub Picture0_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  99.      picture0.Picture = PicClip1.GraphicCell(0 + 10)
  100. End Sub
  101. Sub Picture0_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  102.      picture0.Picture = PicClip1.GraphicCell(0)
  103. End Sub
  104. Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  105.      
  106.      picture1.Picture = PicClip1.GraphicCell(1 + 10)
  107. End Sub
  108. Sub Picture1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  109.      
  110.      picture1.Picture = PicClip1.GraphicCell(1)
  111. End Sub
  112. Sub Picture2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  113.      picture2.Picture = PicClip1.GraphicCell(2 + 10)
  114. End Sub
  115. Sub Picture2_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  116.      picture2.Picture = PicClip1.GraphicCell(2)
  117. End Sub
  118.