home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmGroup.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  13.9 KB  |  357 lines

  1. VERSION 5.00
  2. Begin VB.Form frmGroup 
  3.    Caption         =   "Group Menu"
  4.    ClientHeight    =   3675
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5805
  8.    Icon            =   "frmGroup.frx":0000
  9.    LinkTopic       =   "Form2"
  10.    LockControls    =   -1  'True
  11.    ScaleHeight     =   3675
  12.    ScaleWidth      =   5805
  13.    StartUpPosition =   1  'CenterOwner
  14.    Begin VB.Frame fraFixture 
  15.       Height          =   3165
  16.       Left            =   75
  17.       TabIndex        =   8
  18.       Top             =   0
  19.       Width           =   5640
  20.       Begin VB.TextBox txtBuffering 
  21.          BeginProperty DataFormat 
  22.             Type            =   1
  23.             Format          =   "0"
  24.             HaveTrueFalseNull=   0
  25.             FirstDayOfWeek  =   0
  26.             FirstWeekOfYear =   0
  27.             LCID            =   1033
  28.             SubFormatType   =   1
  29.          EndProperty
  30.          Height          =   375
  31.          Left            =   1470
  32.          TabIndex        =   5
  33.          Top             =   2625
  34.          Width           =   3975
  35.       End
  36.       Begin VB.TextBox txtPreviewMode 
  37.          BeginProperty DataFormat 
  38.             Type            =   1
  39.             Format          =   "0"
  40.             HaveTrueFalseNull=   0
  41.             FirstDayOfWeek  =   0
  42.             FirstWeekOfYear =   0
  43.             LCID            =   1033
  44.             SubFormatType   =   1
  45.          EndProperty
  46.          Height          =   375
  47.          Left            =   1470
  48.          TabIndex        =   4
  49.          Top             =   2145
  50.          Width           =   3975
  51.       End
  52.       Begin VB.TextBox txtOutputFPS 
  53.          BeginProperty DataFormat 
  54.             Type            =   1
  55.             Format          =   "0"
  56.             HaveTrueFalseNull=   0
  57.             FirstDayOfWeek  =   0
  58.             FirstWeekOfYear =   0
  59.             LCID            =   1033
  60.             SubFormatType   =   1
  61.          EndProperty
  62.          Height          =   375
  63.          Left            =   1470
  64.          TabIndex        =   3
  65.          Top             =   1665
  66.          Width           =   3975
  67.       End
  68.       Begin VB.TextBox txtPriority 
  69.          BeginProperty DataFormat 
  70.             Type            =   1
  71.             Format          =   "0"
  72.             HaveTrueFalseNull=   0
  73.             FirstDayOfWeek  =   0
  74.             FirstWeekOfYear =   0
  75.             LCID            =   1033
  76.             SubFormatType   =   1
  77.          EndProperty
  78.          Height          =   375
  79.          Left            =   1470
  80.          TabIndex        =   2
  81.          Top             =   1185
  82.          Width           =   3975
  83.       End
  84.       Begin VB.TextBox txtMediaType 
  85.          BeginProperty DataFormat 
  86.             Type            =   1
  87.             Format          =   "0"
  88.             HaveTrueFalseNull=   0
  89.             FirstDayOfWeek  =   0
  90.             FirstWeekOfYear =   0
  91.             LCID            =   1033
  92.             SubFormatType   =   1
  93.          EndProperty
  94.          Height          =   375
  95.          Left            =   1470
  96.          TabIndex        =   1
  97.          ToolTipText     =   "0 - Video / 1 - Audio"
  98.          Top             =   705
  99.          Width           =   3975
  100.       End
  101.       Begin VB.TextBox txtGroupName 
  102.          Height          =   375
  103.          Left            =   1470
  104.          TabIndex        =   0
  105.          Top             =   225
  106.          Width           =   3975
  107.       End
  108.       Begin VB.Label lblBuffering 
  109.          Caption         =   "Buffering"
  110.          Height          =   255
  111.          Left            =   150
  112.          TabIndex        =   14
  113.          Top             =   2745
  114.          Width           =   975
  115.       End
  116.       Begin VB.Label lblPreviewMode 
  117.          Caption         =   "PreviewMode"
  118.          Height          =   255
  119.          Left            =   150
  120.          TabIndex        =   13
  121.          Top             =   2265
  122.          Width           =   1215
  123.       End
  124.       Begin VB.Label lblOutputFPS 
  125.          Caption         =   "OutputFPS"
  126.          Height          =   255
  127.          Left            =   150
  128.          TabIndex        =   12
  129.          Top             =   1785
  130.          Width           =   1215
  131.       End
  132.       Begin VB.Label lblPriority 
  133.          Caption         =   "Priority"
  134.          Height          =   255
  135.          Left            =   150
  136.          TabIndex        =   11
  137.          Top             =   1305
  138.          Width           =   615
  139.       End
  140.       Begin VB.Label lblMediaType 
  141.          Caption         =   "MediaType"
  142.          Height          =   255
  143.          Left            =   150
  144.          TabIndex        =   10
  145.          ToolTipText     =   "0 - Video / 1 - Audio"
  146.          Top             =   825
  147.          Width           =   1095
  148.       End
  149.       Begin VB.Label lblGroupName 
  150.          Caption         =   "GroupName"
  151.          Height          =   255
  152.          Left            =   150
  153.          TabIndex        =   9
  154.          Top             =   345
  155.          Width           =   1095
  156.       End
  157.    End
  158.    Begin VB.CommandButton cmdCancel 
  159.       Caption         =   "Cancel"
  160.       Height          =   340
  161.       Left            =   4500
  162.       TabIndex        =   7
  163.       Top             =   3255
  164.       Width           =   1215
  165.    End
  166.    Begin VB.CommandButton cmdOk 
  167.       Caption         =   "OK"
  168.       Default         =   -1  'True
  169.       Height          =   340
  170.       Left            =   3300
  171.       TabIndex        =   6
  172.       Top             =   3255
  173.       Width           =   1095
  174.    End
  175. Attribute VB_Name = "frmGroup"
  176. Attribute VB_GlobalNameSpace = False
  177. Attribute VB_Creatable = False
  178. Attribute VB_PredeclaredId = True
  179. Attribute VB_Exposed = False
  180. '*******************************************************************************
  181. '*       This is a part of the Microsoft DXSDK Code Samples.
  182. '*       Copyright (C) 1999-2001 Microsoft Corporation.
  183. '*       All rights reserved.
  184. '*       This source code is only intended as a supplement to
  185. '*       Microsoft Development Tools and/or SDK documentation.
  186. '*       See these sources for detailed information regarding the
  187. '*       Microsoft samples programs.
  188. '*******************************************************************************
  189. Option Explicit
  190. Option Base 0
  191. Option Compare Text
  192. Private m_intUnloadMode As Integer
  193. Private Const DIALOG_TITLE = "Group Help"
  194. ' **************************************************************************************************************************************
  195. ' * PUBLIC INTERFACE- PROPERTIES
  196.             ' ******************************************************************************************************************************
  197.             ' * procedure name: UnloadMode
  198.             ' * procedure description:  Returns an integer specifying the method from which this dialog was last unloaded
  199.             ' *
  200.             ' ******************************************************************************************************************************
  201.             Public Property Get UnloadMode() As Integer
  202.             On Local Error GoTo ErrLine
  203.             'return the value to the client
  204.             UnloadMode = m_intUnloadMode
  205.             Exit Property
  206.             
  207. ErrLine:
  208.             Err.Clear
  209.             Exit Property
  210.             End Property
  211.             
  212.             
  213. ' **************************************************************************************************************************************
  214. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  215.             ' ******************************************************************************************************************************
  216.             ' * procedure name: Form_Load
  217.             ' * procedure description:  Occurs when a form is loaded.
  218.             ' *
  219.             ' ******************************************************************************************************************************
  220.             Private Sub Form_Load()
  221.             On Local Error GoTo ErrLine
  222.             'set default value(s)
  223.             With Me
  224.                .txtGroupName.Text = vbNullString
  225.                .txtMediaType.Text = vbNullString
  226.                .txtPriority.Text = vbNullString
  227.                .txtOutputFPS.Text = vbNullString
  228.                .txtPreviewMode.Text = vbNullString
  229.                .txtBuffering.Text = vbNullString
  230.             End With
  231.             Exit Sub
  232.             
  233. ErrLine:
  234.             Err.Clear
  235.             Exit Sub
  236.             End Sub
  237.             
  238.             
  239.             ' ******************************************************************************************************************************
  240.             ' * procedure name: Form_QueryUnload
  241.             ' * procedure description:  Occurs before a form or application closes.
  242.             ' *
  243.             ' ******************************************************************************************************************************
  244.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  245.             On Local Error GoTo ErrLine
  246.             
  247.             Select Case UnloadMode
  248.                 Case vbFormControlMenu
  249.                          '0 The user chose the Close command from the Control menu on the form.
  250.                          Cancel = 1: Me.Visible = False
  251.                 Case vbFormCode
  252.                          '1 The Unload statement is invoked from code.
  253.                 Case vbAppWindows
  254.                          '2 The current Microsoft Windows operating environment session is ending.
  255.                 Case vbAppTaskManager
  256.                          '3 The Microsoft Windows Task Manager is closing the application.
  257.                          End
  258.                 Case vbFormMDIForm
  259.                          '4 An MDI child form is closing because the MDI form is closing.
  260.                 Case vbFormOwner
  261.                          '5 A form is closing because its owner is closing
  262.             End Select
  263.             Exit Sub
  264.             
  265. ErrLine:
  266.             Err.Clear
  267.             Exit Sub
  268.             End Sub
  269.             
  270.             
  271.             ' ******************************************************************************************************************************
  272.             ' * procedure name: Form_Unload
  273.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  274.             ' *
  275.             ' ******************************************************************************************************************************
  276.             Private Sub Form_Unload(Cancel As Integer)
  277.             On Local Error GoTo ErrLine
  278.             With Me
  279.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  280.             End With
  281.             Exit Sub
  282.             
  283. ErrLine:
  284.             Err.Clear
  285.             Exit Sub
  286.             End Sub
  287.             
  288. ' **************************************************************************************************************************************
  289. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  290.             ' ******************************************************************************************************************************
  291.             ' * procedure name: cmdOk_Click
  292.             ' * procedure description:  occures when the user presses the "Ok" button
  293.             ' *
  294.             ' ******************************************************************************************************************************
  295.             Private Sub cmdOk_Click()
  296.             Dim nResultant As VbMsgBoxResult
  297.             On Local Error GoTo ErrLine
  298.             
  299.             'validation code
  300.             If frmGroup.txtGroupName.Text = vbNullString Then
  301.                 nResultant = MsgBox("You Must Set GroupName", , DIALOG_TITLE)
  302.                 frmGroup.txtGroupName.SetFocus
  303.                 Exit Sub
  304.             End If
  305.             If frmGroup.txtMediaType.Text = vbNullString Then
  306.                 nResultant = MsgBox("You Must Set MediaType", , DIALOG_TITLE)
  307.                 frmGroup.txtMediaType.SetFocus
  308.                 Exit Sub
  309.             End If
  310.             If frmGroup.txtPriority.Text = vbNullString Then
  311.                 nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
  312.                 frmGroup.txtPriority.SetFocus
  313.                 Exit Sub
  314.             End If
  315.             If frmGroup.txtOutputFPS.Text = vbNullString Then
  316.                 nResultant = MsgBox("You Must Set OutputFPS", , DIALOG_TITLE)
  317.                 frmGroup.txtOutputFPS.SetFocus
  318.                 Exit Sub
  319.             End If
  320.             If frmGroup.txtPreviewMode.Text = vbNullString Then
  321.                 nResultant = MsgBox("You Must Set PreviewMode", , DIALOG_TITLE)
  322.                 frmGroup.txtPreviewMode.SetFocus
  323.                 Exit Sub
  324.             End If
  325.             If frmGroup.txtBuffering.Text = vbNullString Then
  326.                 nResultant = MsgBox("You Must Set Buffering", , DIALOG_TITLE)
  327.                 frmGroup.txtBuffering.SetFocus
  328.                 Exit Sub
  329.             End If
  330.             
  331.             'hide the dialog
  332.             Me.Visible = False
  333.             Exit Sub
  334.             
  335. ErrLine:
  336.             Err.Clear
  337.             Exit Sub
  338.             End Sub
  339.             
  340.             
  341.             ' ******************************************************************************************************************************
  342.             ' * procedure name: cmdCancel_Click
  343.             ' * procedure description:  occures when the user presses the "Cancel" button
  344.             ' *
  345.             ' ******************************************************************************************************************************
  346.             Private Sub cmdCancel_Click()
  347.             On Local Error GoTo ErrLine
  348.             'hide the dialog
  349.             Me.Visible = False
  350.             m_intUnloadMode = 1
  351.             Exit Sub
  352.             
  353. ErrLine:
  354.             Err.Clear
  355.             Exit Sub
  356.             End Sub
  357.