www.pudn.com > DataCollectionSystem.rar > dlgSetting.frm, change:2003-06-12,size:7515b


VERSION 5.00 
Begin VB.Form dlgSetting  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "界面设置" 
   ClientHeight    =   1665 
   ClientLeft      =   2760 
   ClientTop       =   3750 
   ClientWidth     =   5430 
   BeginProperty Font  
      Name            =   "宋体" 
      Size            =   9 
      Charset         =   0 
      Weight          =   400 
      Underline       =   0   'False 
      Italic          =   0   'False 
      Strikethrough   =   0   'False 
   EndProperty 
   Icon            =   "dlgSetting.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   1665 
   ScaleWidth      =   5430 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   1  '所有者中心 
   Begin PrjMain.GurhanButton CancelButton  
      Height          =   375 
      Left            =   3840 
      TabIndex        =   5 
      Top             =   720 
      Width           =   1335 
      _ExtentX        =   2143 
      _ExtentY        =   661 
      Caption         =   "取消  " 
      Picture         =   "dlgSetting.frx":08CA 
      Enabled         =   -1  'True 
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      XPStyle         =   -1  'True 
      XPColor_Pressed =   16744576 
      XPColor_Hover   =   16761024 
   End 
   Begin PrjMain.GurhanButton OKButton  
      Default         =   -1  'True 
      Height          =   375 
      Left            =   3840 
      TabIndex        =   4 
      Top             =   240 
      Width           =   1335 
      _ExtentX        =   2143 
      _ExtentY        =   661 
      Caption         =   "确定  " 
      Picture         =   "dlgSetting.frx":11A4 
      Enabled         =   -1  'True 
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   0 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      XPStyle         =   -1  'True 
      XPColor_Pressed =   16744576 
      XPColor_Hover   =   16761024 
   End 
   Begin VB.Frame fraSpecialEffects  
      Caption         =   "菜单特殊效果/样式" 
      Height          =   1275 
      Left            =   240 
      TabIndex        =   0 
      Top             =   120 
      Width           =   3315 
      Begin VB.OptionButton optStyle  
         Caption         =   "标准" 
         Height          =   255 
         Index           =   0 
         Left            =   120 
         TabIndex        =   8 
         Top             =   480 
         Width           =   855 
      End 
      Begin VB.OptionButton optStyle  
         Caption         =   "按钮" 
         Height          =   255 
         Index           =   1 
         Left            =   120 
         TabIndex        =   7 
         Top             =   720 
         Width           =   735 
      End 
      Begin VB.OptionButton optStyle  
         Caption         =   "XP风格" 
         Height          =   255 
         Index           =   2 
         Left            =   120 
         TabIndex        =   6 
         Top             =   960 
         Width           =   975 
      End 
      Begin VB.CheckBox chkBackground  
         Caption         =   "背景图片" 
         Height          =   255 
         Left            =   120 
         TabIndex        =   3 
         Top             =   180 
         Width           =   1215 
      End 
      Begin VB.CheckBox chkShadow  
         Caption         =   "XP阴影" 
         Height          =   255 
         Left            =   1560 
         TabIndex        =   2 
         Top             =   960 
         Value           =   1  'Checked 
         Width           =   975 
      End 
      Begin VB.CheckBox chkShadowTop  
         Caption         =   "顶层菜单XP阴影" 
         Height          =   195 
         Left            =   1560 
         TabIndex        =   1 
         Top             =   720 
         Value           =   1  'Checked 
         Width           =   1575 
      End 
   End 
End 
Attribute VB_Name = "dlgSetting" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
Option Explicit 
 
Private Sub CancelButton_Click() 
Unload Me 
End Sub 
 
Private Sub chkBackground_Click() 
 If (chkBackground.Value = Checked) Then 
      Set frmMain.ctlPopMenu.BackgroundPicture = frmMain.picBackground.Picture 
 Else 
      frmMain.ctlPopMenu.ClearBackgroundPicture 
 End If 
End Sub 
 
Private Sub chkShadow_Click() 
  If chkShadow.Value = Checked Then 
    frmMain.ctlPopMenu.ShadowXPHighlight = True 
  Else 
    frmMain.ctlPopMenu.ShadowXPHighlight = False 
  End If 
End Sub 
 
Private Sub chkShadowTop_Click() 
If chkShadowTop.Value = Checked Then 
    frmMain.ctlPopMenu.ShadowXPHighlightTopMenu = True 
Else 
    frmMain.ctlPopMenu.ShadowXPHighlightTopMenu = False 
End If 
End Sub 
 
Private Sub Form_Load() 
 
If GetIniS("菜单风格", "背景图片", "有") = "有" Then 
    chkBackground.Value = Checked 
Else 
    chkBackground.Value = Unchecked 
End If 
 
If GetIniS("菜单风格", "高亮样式", "标准") = "标准" Then 
    optStyle(0).Value = True 
ElseIf GetIniS("菜单风格", "高亮样式", "标准") = "按钮" Then 
    optStyle(1).Value = True 
ElseIf GetIniS("菜单风格", "高亮样式", "标准") = "XP风格" Then 
    optStyle(2).Value = True 
End If 
If GetIniS("菜单风格", "顶层菜单XP阴影", "是") = "是" Then 
    chkShadowTop.Value = Checked 
Else 
    chkShadowTop.Value = Unchecked 
End If 
If GetIniS("菜单风格", "XP阴影高亮", "是") = "是" Then 
    chkShadow.Value = Checked 
Else 
    chkShadow.Value = Unchecked 
End If 
End Sub 
 
Private Sub OKButton_Click() 
Unload Me 
End Sub 
 
Private Sub optStyle_Click(Index As Integer) 
  Select Case Index 
    Case 0 
      optStyle(0).Value = True 
      optStyle(1).Value = False 
      optStyle(1).Value = False 
      frmMain.ctlPopMenu.HighlightStyle = cspHighlightStandard 
    Case 1 
      optStyle(1).Value = True 
      optStyle(0).Value = False 
      optStyle(2).Value = False 
      frmMain.ctlPopMenu.HighlightStyle = cspHighlightButton 
    Case 2 
      optStyle(2).Value = True 
      optStyle(0).Value = False 
      optStyle(1).Value = False 
      frmMain.ctlPopMenu.HighlightStyle = cspHighlightXP 
  End Select 
End Sub 
 
Private Sub SaveStyle() 
 If (chkBackground.Value = Checked) Then 
      SetIniS "菜单风格", "背景图片", "有" 
 Else 
      SetIniS "菜单风格", "背景图片", "无" 
 End If 
  
 If optStyle(0).Value = True Then 
      SetIniS "菜单风格", "高亮样式", "标准" 
 ElseIf optStyle(1).Value = True Then 
      SetIniS "菜单风格", "高亮样式", "按钮" 
 ElseIf optStyle(2).Value = True Then 
      SetIniS "菜单风格", "高亮样式", "XP风格" 
 End If 
 If chkShadowTop.Value = Checked Then 
    SetIniS "菜单风格", "顶层菜单XP阴影", "是" 
 Else 
    SetIniS "菜单风格", "顶层菜单XP阴影", "否" 
 End If 
 If chkShadow.Value = Checked Then 
    SetIniS "菜单风格", "XP阴影高亮", "是" 
 Else 
    SetIniS "菜单风格", "XP阴影高亮", "否" 
 End If 
End Sub