home *** CD-ROM | disk | FTP | other *** search
/ Beginning Direct3D Game Programming / Direct3D.iso / directx / dxf / samples / multimedia / vbsamples / directshow / editing / dextervb / frmabout.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-09-22  |  9.3 KB  |  229 lines

  1. VERSION 5.00
  2. Begin VB.Form frmAbout 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "About Dexter VB Sample"
  5.    ClientHeight    =   3555
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5730
  9.    ClipControls    =   0   'False
  10.    Icon            =   "frmAbout.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2453.724
  16.    ScaleMode       =   0  'User
  17.    ScaleWidth      =   5380.766
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   1  'CenterOwner
  20.    Begin VB.PictureBox picIcon 
  21.       AutoSize        =   -1  'True
  22.       ClipControls    =   0   'False
  23.       Height          =   540
  24.       Left            =   240
  25.       Picture         =   "frmAbout.frx":030A
  26.       ScaleHeight     =   337.12
  27.       ScaleMode       =   0  'User
  28.       ScaleWidth      =   337.12
  29.       TabIndex        =   1
  30.       Top             =   240
  31.       Width           =   540
  32.    End
  33.    Begin VB.CommandButton cmdOK 
  34.       Cancel          =   -1  'True
  35.       Caption         =   "OK"
  36.       Default         =   -1  'True
  37.       Height          =   345
  38.       Left            =   4245
  39.       TabIndex        =   0
  40.       Top             =   2625
  41.       Width           =   1260
  42.    End
  43.    Begin VB.CommandButton cmdSysInfo 
  44.       Caption         =   "&System Info..."
  45.       Height          =   345
  46.       Left            =   4260
  47.       TabIndex        =   2
  48.       Top             =   3075
  49.       Width           =   1245
  50.    End
  51.    Begin VB.Line Line1 
  52.       BorderColor     =   &H00808080&
  53.       BorderStyle     =   6  'Inside Solid
  54.       Index           =   1
  55.       X1              =   84.515
  56.       X2              =   5309.398
  57.       Y1              =   1687.583
  58.       Y2              =   1687.583
  59.    End
  60.    Begin VB.Label lblDescription 
  61.       Caption         =   "Copyright 
  62.  1999 - 2000 Microsoft Corporation"
  63.       ForeColor       =   &H00000000&
  64.       Height          =   1170
  65.       Left            =   1050
  66.       TabIndex        =   3
  67.       Top             =   825
  68.       Width           =   3885
  69.    End
  70.    Begin VB.Label lblTitle 
  71.       Caption         =   "VB Dexter Sample Application"
  72.       ForeColor       =   &H00000000&
  73.       Height          =   255
  74.       Left            =   1050
  75.       TabIndex        =   5
  76.       Top             =   240
  77.       Width           =   3885
  78.    End
  79.    Begin VB.Line Line1 
  80.       BorderColor     =   &H00FFFFFF&
  81.       BorderWidth     =   2
  82.       Index           =   0
  83.       X1              =   98.6
  84.       X2              =   5309.398
  85.       Y1              =   1697.936
  86.       Y2              =   1697.936
  87.    End
  88.    Begin VB.Label lblVersion 
  89.       Caption         =   "Version 1.0"
  90.       Height          =   225
  91.       Left            =   1050
  92.       TabIndex        =   6
  93.       Top             =   525
  94.       Width           =   3885
  95.    End
  96.    Begin VB.Label lblDisclaimer 
  97.       Caption         =   "Warning: You must have DX8 or newer."
  98.       ForeColor       =   &H00000000&
  99.       Height          =   825
  100.       Left            =   255
  101.       TabIndex        =   4
  102.       Top             =   2625
  103.       Width           =   3870
  104.    End
  105. Attribute VB_Name = "frmAbout"
  106. Attribute VB_GlobalNameSpace = False
  107. Attribute VB_Creatable = False
  108. Attribute VB_PredeclaredId = True
  109. Attribute VB_Exposed = False
  110. '*******************************************************************************
  111. '*       This is a part of the Microsoft DXSDK Code Samples.
  112. '*       Copyright (C) 1999-2000 Microsoft Corporation.
  113. '*       All rights reserved.
  114. '*       This source code is only intended as a supplement to
  115. '*       Microsoft Development Tools and/or SDK documentation.
  116. '*       See these sources for detailed information regarding the
  117. '*       Microsoft samples programs.
  118. '*******************************************************************************
  119. Option Explicit
  120. Option Base 0
  121. Option Compare Text
  122.             
  123.             
  124. ' **************************************************************************************************************************************
  125. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  126.             ' ******************************************************************************************************************************
  127.             ' * procedure name: Form_Load
  128.             ' * procedure description:  Occurs when a form is loaded.
  129.             ' *
  130.             ' ******************************************************************************************************************************
  131.             Private Sub Form_Load()
  132.             On Local Error GoTo ErrLine
  133.             Me.Caption = "About " & App.Title: lblTitle.Caption = App.Title
  134.             lblVersion.Caption = "Version " & CStr(App.Major) & "." & CStr(App.Minor) & "." & CStr(App.Revision)
  135.             Exit Sub
  136.             
  137. ErrLine:
  138.             Err.Clear
  139.             Exit Sub
  140.             End Sub
  141.             
  142.             
  143.             ' ******************************************************************************************************************************
  144.             ' * procedure name: Form_QueryUnload
  145.             ' * procedure description:  Occurs before a form or application closes.
  146.             ' *
  147.             ' ******************************************************************************************************************************
  148.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  149.             On Local Error GoTo ErrLine
  150.             
  151.             Select Case UnloadMode
  152.                 Case vbFormControlMenu
  153.                          '0 The user chose the Close command from the Control menu on the form.
  154.                 Case vbFormCode
  155.                          '1 The Unload statement is invoked from code.
  156.                 Case vbAppWindows
  157.                          '2 The current Microsoft Windows operating environment session is ending.
  158.                 Case vbAppTaskManager
  159.                          '3 The Microsoft Windows Task Manager is closing the application.
  160.                          End
  161.                 Case vbFormMDIForm
  162.                          '4 An MDI child form is closing because the MDI form is closing.
  163.                 Case vbFormOwner
  164.                          '5 A form is closing because its owner is closing
  165.             End Select
  166.             Exit Sub
  167.             
  168. ErrLine:
  169.             Err.Clear
  170.             Exit Sub
  171.             End Sub
  172.             
  173.             
  174.             ' ******************************************************************************************************************************
  175.             ' * procedure name: Form_Unload
  176.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  177.             ' *
  178.             ' ******************************************************************************************************************************
  179.             Private Sub Form_Unload(Cancel As Integer)
  180.             On Local Error GoTo ErrLine
  181.             With Me
  182.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  183.             End With
  184.             Exit Sub
  185.             
  186. ErrLine:
  187.             Err.Clear
  188.             Exit Sub
  189.             End Sub
  190. ' **************************************************************************************************************************************
  191. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  192.             ' ******************************************************************************************************************************
  193.             ' * procedure name: cmdSysInfo_Click
  194.             ' * procedure description:  occures when the 'System Information' command button is pressed
  195.             ' *
  196.             ' ******************************************************************************************************************************
  197.             Private Sub cmdSysInfo_Click()
  198.             Dim bstrSysInfoPath As String
  199.             On Local Error GoTo ErrLine
  200.             
  201.             'query the registry for a path to msinfo.exe, and execute the application for the user
  202.             If Registry_DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO") Then
  203.                bstrSysInfoPath = Registry_QueryEntryValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO", "Path", vbNullString)
  204.                
  205.                Call Shell(bstrSysInfoPath, vbNormalFocus)
  206.             End If
  207.             Exit Sub
  208.             
  209. ErrLine:
  210.             Err.Clear
  211.             Exit Sub
  212.             End Sub
  213.             
  214.             
  215.             ' ******************************************************************************************************************************
  216.             ' * procedure name: cmdOK_Click
  217.             ' * procedure description:  occures when the 'ok' command button is pressed
  218.             ' *
  219.             ' ******************************************************************************************************************************
  220.             Private Sub cmdOk_Click()
  221.             On Local Error GoTo ErrLine
  222.             Unload Me
  223.             Exit Sub
  224.             
  225. ErrLine:
  226.             Err.Clear
  227.             Exit Sub
  228.             End Sub
  229.