Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

222 lines
8.9 KiB

VERSION 5.00
Begin VB.PropertyPage ppgFolderAccess
Caption = "File Explorer: Determine Folder Access"
ClientHeight = 3600
ClientLeft = 0
ClientTop = 0
ClientWidth = 4800
PaletteMode = 0 'Halftone
ScaleHeight = 3600
ScaleWidth = 4800
Begin VB.OptionButton optNo
Caption = "No"
Height = 375
Left = 360
TabIndex = 1
Top = 1800
Value = -1 'True
Width = 975
End
Begin VB.OptionButton optYes
Caption = "Yes"
Height = 375
Left = 360
TabIndex = 0
Top = 1320
Width = 975
End
Begin VB.Label Label1
Caption = "Do you want to allow creating, renaming, and deleting folders?"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 360
TabIndex = 2
Top = 240
Width = 3735
End
End
Attribute VB_Name = "ppgFolderAccess"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
' ===========================================================================
' | THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |
' | ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
' | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
' | PARTICULAR PURPOSE. |
' | Copyright (c) 1998-1999 Microsoft Corporation |
' ===========================================================================
' =============================================================================
' File: ppgNetDrives.pag
' Project: FileExplorerSample
' Type: Property Page for Configuration Wizard
' =============================================================================
' Property pages used in a configuration wizard must implement the IWizardPage
' interface defined by the snap-in designer runtime. The runtime uses this
' interface to communicate Win32 property sheet events to the page. Note that
' unlike event handlers, methods of an implemented interface must all be present
' in the source file even if they do not contain any code.
Implements IWizardPage
' FileExplorer's ConfigData object is passed in the event
' PropertyPage_SelectionChanged. We store it here so that IWizardPage methods
' will have access to it as the user interacts with the page.
Private m_ConfigData As ConfigData
' =============================================================================
' Method: IWizardPage_Activate
' Type: Interface Method
' Description: Called when the page is about to be displayed.
'
' Parameters: EnableBack Defaults to True. Set to False to disable the
' Back button.
' NextOrFinish Defaults to NextButton. Determines type of
' second button. Other options are
' EnabledFinishButton and DisabledFinishButton.
' FinishText If using a Finish button, determines the text
' that will be displayed in the button. If not
' set then defaults to "Finish".
' Output: None
' Notes: As this is not the first page of the wizard we enable the
' back button. As there are more pages to the wizard, we request
' a Next button rather than a Finish button.
' =============================================================================
'
Private Sub IWizardPage_Activate(EnableBack As Boolean, _
NextOrFinish As SnapInLib.WizardPageButtonConstants, _
FinishText As String)
EnableBack = True
NextOrFinish = EnabledNextButton
End Sub
' =============================================================================
' Method: IWizardPage_Back
' Type: Interface Method
' Description: Called when the user clicks the Back button
'
' Parameters: NextPage Defaults to zero to allow the user to return
' to the previous page. Set to -1 to disallow
' the move, or to a positive integer to move to
' another page. Pages are numbered from 1 to n
' based on the order in which the snap-in called
' PropertySheet.AddWizardPage.
' Output: None
' Notes: Apply any changes made by the user to the ConfigData object
' =============================================================================
'
Private Sub IWizardPage_Back(NextPage As Long)
ApplyConfigChanges
End Sub
' =============================================================================
' Method: IWizardPage_Cancel
' Type: Interface Method
' Description: Called when the user clicks the Cancel button
'
' Parameters: Allow Defaults to True to allow the user to cancel
' the wizard. Set to False to disallow the
' the cancel.
' Output: None
' Notes: None
' =============================================================================
'
Private Sub IWizardPage_Cancel(Allow As Boolean)
Allow = True
End Sub
' =============================================================================
' Method: IWizardPage_Finish
' Type: Interface Method
' Description: Called when the user clicks the Finish button
'
' Parameters: Allow Defaults to True to allow the user to finish
' the wizard. Set to False to disallow the
' the finish.
' Output: None
' Notes: None
' =============================================================================
'
Private Sub IWizardPage_Finish(Allow As Boolean)
End Sub
' =============================================================================
' Method: IWizardPage_Next
' Type: Interface Method
' Description: Called when the user clicks the Next button
'
' Parameters: NextPage Defaults to zero to allow the user to proceed
' to the next page. Set to -1 to disallow
' the move, or to a positive integer to move to
' another page. Pages are numbered from 1 to n
' based on the order in which the snap-in called
' PropertySheet.AddWizardPage.
' Output: None
' Notes: Apply any changes made by the user to the ConfigData object
' =============================================================================
'
Private Sub IWizardPage_Next(NextPage As Long)
ApplyConfigChanges
End Sub
' =============================================================================
' Method: ApplyConfigChanges()
' Type: Subroutine
' Description: Transfers the contents of the UI fields to the ConfigData object
'
' Parameters: None
' Output: None
' Notes: None
' =============================================================================
'
Private Sub ApplyConfigChanges()
If optYes.Value Then
m_ConfigData.AllowFolderAccess = True
Else
m_ConfigData.AllowFolderAccess = False
End If
End Sub
' =============================================================================
' Method: PropertyPage_SelectionChanged
' Type: Event
' Description: Called when the property sheet passes the object(s) for which
' it is being displayed to the property page. For wizard pages
' the snap-in passes an object of its choice. The FileExplorer
' passes its ConfigData object.
' Parameters: None
' Output: None
' Notes: Store the ConfigData object in a member variable for use by
' IWizard page methods as the user interacts with the page.
' =============================================================================
'
Private Sub PropertyPage_SelectionChanged()
On Error Resume Next
Set m_ConfigData = SelectedControls(0)
If m_ConfigData Is Nothing Then
Set m_ConfigData = SelectedControls(0).Tag
End If
End Sub