home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD138551172001.psc / MessgBox.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-01-17  |  6.8 KB  |  207 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form frmMessgBox 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Title"
  6.    ClientHeight    =   1485
  7.    ClientLeft      =   150
  8.    ClientTop       =   150
  9.    ClientWidth     =   4605
  10.    ControlBox      =   0   'False
  11.    Icon            =   "MessgBox.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1485
  16.    ScaleWidth      =   4605
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin MessgBox.XDWButton Button 
  19.       Height          =   345
  20.       Index           =   0
  21.       Left            =   840
  22.       TabIndex        =   0
  23.       Top             =   1050
  24.       Width           =   1095
  25.       _ExtentX        =   1931
  26.       _ExtentY        =   609
  27.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  28.          Name            =   "MS Sans Serif"
  29.          Size            =   8.25
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Caption         =   "Caption"
  37.       HoverColor      =   -2147483639
  38.       ButtonBorderStyle=   1
  39.    End
  40.    Begin MSComctlLib.ImageList ImageList1 
  41.       Left            =   60
  42.       Top             =   900
  43.       _ExtentX        =   1005
  44.       _ExtentY        =   1005
  45.       BackColor       =   -2147483643
  46.       ImageWidth      =   32
  47.       ImageHeight     =   32
  48.       MaskColor       =   12632256
  49.       _Version        =   393216
  50.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  51.          NumListImages   =   6
  52.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  53.             Picture         =   "MessgBox.frx":000C
  54.             Key             =   ""
  55.          EndProperty
  56.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  57.             Picture         =   "MessgBox.frx":0330
  58.             Key             =   ""
  59.          EndProperty
  60.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  61.             Picture         =   "MessgBox.frx":0654
  62.             Key             =   ""
  63.          EndProperty
  64.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  65.             Picture         =   "MessgBox.frx":0978
  66.             Key             =   ""
  67.          EndProperty
  68.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  69.             Picture         =   "MessgBox.frx":0C9C
  70.             Key             =   ""
  71.          EndProperty
  72.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  73.             Picture         =   "MessgBox.frx":1578
  74.             Key             =   ""
  75.          EndProperty
  76.       EndProperty
  77.    End
  78.    Begin MessgBox.XDWButton Button 
  79.       Height          =   345
  80.       Index           =   1
  81.       Left            =   2130
  82.       TabIndex        =   1
  83.       Top             =   1050
  84.       Visible         =   0   'False
  85.       Width           =   1095
  86.       _ExtentX        =   1931
  87.       _ExtentY        =   609
  88.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  89.          Name            =   "MS Sans Serif"
  90.          Size            =   8.25
  91.          Charset         =   0
  92.          Weight          =   400
  93.          Underline       =   0   'False
  94.          Italic          =   0   'False
  95.          Strikethrough   =   0   'False
  96.       EndProperty
  97.       Caption         =   "Caption"
  98.       HoverColor      =   -2147483639
  99.       ButtonBorderStyle=   1
  100.    End
  101.    Begin MessgBox.XDWButton Button 
  102.       Height          =   345
  103.       Index           =   2
  104.       Left            =   3420
  105.       TabIndex        =   2
  106.       Top             =   1050
  107.       Visible         =   0   'False
  108.       Width           =   1095
  109.       _ExtentX        =   1931
  110.       _ExtentY        =   609
  111.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  112.          Name            =   "MS Sans Serif"
  113.          Size            =   8.25
  114.          Charset         =   0
  115.          Weight          =   400
  116.          Underline       =   0   'False
  117.          Italic          =   0   'False
  118.          Strikethrough   =   0   'False
  119.       EndProperty
  120.       Caption         =   "Caption"
  121.       HoverColor      =   -2147483639
  122.       ButtonBorderStyle=   1
  123.    End
  124.    Begin VB.Line Line1 
  125.       BorderColor     =   &H80000014&
  126.       Index           =   3
  127.       X1              =   4620
  128.       X2              =   720
  129.       Y1              =   940
  130.       Y2              =   940
  131.    End
  132.    Begin VB.Line Line1 
  133.       BorderColor     =   &H80000010&
  134.       Index           =   2
  135.       X1              =   4620
  136.       X2              =   720
  137.       Y1              =   930
  138.       Y2              =   930
  139.    End
  140.    Begin VB.Label Label1 
  141.       Alignment       =   2  'Center
  142.       Caption         =   "Message box text"
  143.       Height          =   675
  144.       Left            =   900
  145.       TabIndex        =   3
  146.       Top             =   180
  147.       Width           =   3555
  148.    End
  149.    Begin VB.Line Line2 
  150.       BorderColor     =   &H80000000&
  151.       X1              =   0
  152.       X2              =   4620
  153.       Y1              =   0
  154.       Y2              =   0
  155.    End
  156.    Begin VB.Image Image1 
  157.       Height          =   480
  158.       Left            =   120
  159.       Top             =   300
  160.       Width           =   480
  161.    End
  162.    Begin VB.Line Line1 
  163.       BorderColor     =   &H80000000&
  164.       Index           =   1
  165.       X1              =   728
  166.       X2              =   728
  167.       Y1              =   0
  168.       Y2              =   1500
  169.    End
  170.    Begin VB.Line Line1 
  171.       BorderColor     =   &H80000010&
  172.       Index           =   0
  173.       X1              =   720
  174.       X2              =   720
  175.       Y1              =   0
  176.       Y2              =   1500
  177.    End
  178. Attribute VB_Name = "frmMessgBox"
  179. Attribute VB_GlobalNameSpace = False
  180. Attribute VB_Creatable = False
  181. Attribute VB_PredeclaredId = True
  182. Attribute VB_Exposed = False
  183. Option Explicit
  184. Private Sub Button_Click(Index As Integer)
  185. 'Stores value of pressed button
  186.    Select Case Index
  187.       Case 0: Message = 0
  188.       Case 1: Message = 1
  189.       Case 2: Message = 2
  190.       Case Else 'Nothing to do
  191.    End Select
  192.    Unload Me
  193. End Sub
  194. Private Sub Form_Load()
  195. 'Plays a sound according to selected value
  196.    Dim CustSnd As Long
  197.    Select Case IcoVal
  198.       Case 1: MessageBeep MB_ICONASTERISK
  199.       Case 2: MessageBeep MB_ICONQUESTION
  200.       Case 3: MessageBeep MB_ICONEXCLAMATION
  201.       Case 4: MessageBeep MB_ICONINFORMATION
  202.       Case 5: CustSnd = sndPlaySound(App.Path & "\Tada.wav", 1)
  203.       Case 6: CustSnd = sndPlaySound(App.Path & "\Test.wav", 1)
  204.       Case Else 'Nothing to do
  205.    End Select
  206. End Sub
  207.