www.pudn.com > sdk3000demo.rar > OsdSet.frm, change:2009-07-04,size:13733b


VERSION 5.00 
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" 
Begin VB.Form formOsdSet  
   Caption         =   "字幕叠加设置" 
   ClientHeight    =   5085 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   10215 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   5085 
   ScaleWidth      =   10215 
   StartUpPosition =   3  'Windows Default 
   Begin MSComDlg.CommonDialog cdlAll  
      Left            =   9360 
      Top             =   1800 
      _ExtentX        =   847 
      _ExtentY        =   847 
      _Version        =   393216 
   End 
   Begin VB.CommandButton btnOk  
      Caption         =   "确定" 
      Height          =   375 
      Left            =   9000 
      TabIndex        =   19 
      Top             =   480 
      Width           =   975 
   End 
   Begin VB.CommandButton btnCancel  
      Caption         =   "取消" 
      Height          =   375 
      Left            =   9000 
      TabIndex        =   20 
      Top             =   960 
      Width           =   975 
   End 
   Begin VB.Frame Frame2  
      Caption         =   "日期叠加" 
      Height          =   4575 
      Left            =   4680 
      TabIndex        =   10 
      Top             =   240 
      Width           =   3975 
      Begin VB.CheckBox checkShow2  
         Caption         =   "启用" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   11 
         Top             =   480 
         Width           =   735 
      End 
      Begin VB.CommandButton btnFont2  
         Caption         =   "字体..." 
         Height          =   375 
         Left            =   720 
         TabIndex        =   17 
         Top             =   3840 
         Width           =   975 
      End 
      Begin VB.CommandButton btnBkColor2  
         Caption         =   "背景色..." 
         Height          =   375 
         Left            =   1920 
         TabIndex        =   18 
         Top             =   3840 
         Width           =   975 
      End 
      Begin VB.TextBox editHeight2  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   12 
         Top             =   840 
         Width           =   1695 
      End 
      Begin VB.TextBox editLeft2  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   15 
         Top             =   2280 
         Width           =   1695 
      End 
      Begin VB.TextBox editSpacing2  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   14 
         Top             =   1800 
         Width           =   1695 
      End 
      Begin VB.TextBox editWidth2  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   13 
         Top             =   1320 
         Width           =   1695 
      End 
      Begin VB.TextBox editTop2  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   16 
         Top             =   2760 
         Width           =   1695 
      End 
      Begin VB.Label Label12  
         Caption         =   "字符高度:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   31 
         Top             =   960 
         Width           =   1455 
      End 
      Begin VB.Label Label11  
         Caption         =   "叠加文本坐标Y:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   30 
         Top             =   2880 
         Width           =   1455 
      End 
      Begin VB.Label Label10  
         Caption         =   "字符间距离:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   29 
         Top             =   1920 
         Width           =   1455 
      End 
      Begin VB.Label Label9  
         Caption         =   "字符宽度:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   28 
         Top             =   1440 
         Width           =   1455 
      End 
      Begin VB.Label Label8  
         Caption         =   "叠加文本坐标X:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   27 
         Top             =   2400 
         Width           =   1455 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "文字叠加" 
      Height          =   4575 
      Left            =   240 
      TabIndex        =   0 
      Top             =   240 
      Width           =   3975 
      Begin VB.TextBox editText1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   7 
         Top             =   3240 
         Width           =   1695 
      End 
      Begin VB.TextBox editTop1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   6 
         Top             =   2760 
         Width           =   1695 
      End 
      Begin VB.TextBox editWidth1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   3 
         Top             =   1320 
         Width           =   1695 
      End 
      Begin VB.TextBox editSpacing1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   4 
         Top             =   1800 
         Width           =   1695 
      End 
      Begin VB.TextBox editLeft1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   5 
         Top             =   2280 
         Width           =   1695 
      End 
      Begin VB.TextBox editHeight1  
         Height          =   375 
         Left            =   1920 
         TabIndex        =   2 
         Top             =   840 
         Width           =   1695 
      End 
      Begin VB.CommandButton btnBkColor1  
         Caption         =   "背景色..." 
         Height          =   375 
         Left            =   1920 
         TabIndex        =   9 
         Top             =   3840 
         Width           =   975 
      End 
      Begin VB.CommandButton btnFont1  
         Caption         =   "字体..." 
         Height          =   375 
         Left            =   720 
         TabIndex        =   8 
         Top             =   3840 
         Width           =   975 
      End 
      Begin VB.CheckBox checkShow1  
         Caption         =   "启用" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   1 
         Top             =   480 
         Width           =   735 
      End 
      Begin VB.Label Label6  
         Caption         =   "叠加文本:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   26 
         Top             =   3360 
         Width           =   1455 
      End 
      Begin VB.Label Label5  
         Caption         =   "叠加文本坐标X:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   25 
         Top             =   2400 
         Width           =   1455 
      End 
      Begin VB.Label Label4  
         Caption         =   "字符宽度:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   24 
         Top             =   1440 
         Width           =   1455 
      End 
      Begin VB.Label Label3  
         Caption         =   "字符间距离:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   23 
         Top             =   1920 
         Width           =   1455 
      End 
      Begin VB.Label Label2  
         Caption         =   "叠加文本坐标Y:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   22 
         Top             =   2880 
         Width           =   1455 
      End 
      Begin VB.Label Label1  
         Caption         =   "字符高度:" 
         Height          =   255 
         Left            =   480 
         TabIndex        =   21 
         Top             =   960 
         Width           =   1455 
      End 
   End 
End 
Attribute VB_Name = "formOsdSet" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
 
Private Sub btnBkColor1_Click() 
 
    formMain.SDK30001.ToTransparent = False 
    cdlAll.DialogTitle = "请选择背景色" 
    cdlAll.Flags = cdlCCRGBInit 
    cdlAll.Color = formMain.SDK30001.ToBkColor 
     
    cdlAll.CancelError = True 
        On Error GoTo ErrHandler 
    cdlAll.ShowColor 
        formMain.SDK30001.ToBkColor = cdlAll.Color 
     
ErrHandler: 
       Exit Sub 
        
End Sub 
'Download by http://www.codefans.net 
Private Sub btnBkColor2_Click() 
 
    formMain.SDK30001.DoTransparent = False 
    cdlAll.DialogTitle = "请选择背景色" 
    cdlAll.Flags = cdlCCRGBInit 
    cdlAll.Color = formMain.SDK30001.DoBkColor 
     
    cdlAll.CancelError = True 
        On Error GoTo ErrHandler 
    cdlAll.ShowColor 
        formMain.SDK30001.DoBkColor = cdlAll.Color 
     
ErrHandler: 
       Exit Sub 
 
End Sub 
 
Private Sub btnCancel_Click() 
 
    '关闭此窗口 
    Call Unload(Me) 
     
End Sub 
 
Private Sub btnFont1_Click() 
        
    cdlAll.DialogTitle = "请选择字体" 
    cdlAll.Flags = cdlCFScreenFonts + cdlCFEffects 
    cdlAll.FontName = formMain.SDK30001.ToFaceName 
    cdlAll.Color = formMain.SDK30001.ToTextColor 
    cdlAll.FontItalic = formMain.SDK30001.ToItalic 
    cdlAll.FontStrikethru = formMain.SDK30001.ToStrikeOut 
    cdlAll.FontUnderline = formMain.SDK30001.ToUnderline 
     
    If formMain.SDK30001.ToWeight = 700 Then 
        cdlAll.FontBold = True 
    End If 
     
    '显示“字体”对话框 
    cdlAll.CancelError = True 
        On Error GoTo ErrHandler 
         
    Call cdlAll.ShowFont 
        formMain.SDK30001.ToFaceName = cdlAll.FontName 
        formMain.SDK30001.ToTextColor = cdlAll.Color 
        formMain.SDK30001.ToItalic = cdlAll.FontItalic 
        formMain.SDK30001.ToStrikeOut = cdlAll.FontStrikethru 
        formMain.SDK30001.ToUnderline = cdlAll.FontUnderline 
        If cdlAll.FontBold Then 
            formMain.SDK30001.ToWeight = 700 
        Else 
            formMain.SDK30001.ToWeight = 400 
        End If 
     
ErrHandler: 
       Exit Sub 
        
End Sub 
 
Private Sub btnFont2_Click() 
         
    cdlAll.DialogTitle = "请选择字体" 
    cdlAll.Flags = cdlCFScreenFonts + cdlCFEffects 
    cdlAll.FontName = formMain.SDK30001.DoFaceName 
    cdlAll.Color = formMain.SDK30001.DoTextColor 
    cdlAll.FontItalic = formMain.SDK30001.DoItalic 
    cdlAll.FontStrikethru = formMain.SDK30001.DoStrikeOut 
    cdlAll.FontUnderline = formMain.SDK30001.DoUnderline 
     
    If formMain.SDK30001.DoWeight = 700 Then 
        cdlAll.FontBold = True 
    End If 
     
    '显示“字体”对话框 
    cdlAll.CancelError = True 
        On Error GoTo ErrHandler 
         
    Call cdlAll.ShowFont 
        formMain.SDK30001.DoFaceName = cdlAll.FontName 
        formMain.SDK30001.DoTextColor = cdlAll.Color 
        formMain.SDK30001.DoItalic = cdlAll.FontItalic 
        formMain.SDK30001.DoStrikeOut = cdlAll.FontStrikethru 
        formMain.SDK30001.DoUnderline = cdlAll.FontUnderline 
        If cdlAll.FontBold Then 
            formMain.SDK30001.DoWeight = 700 
        Else 
            formMain.SDK30001.DoWeight = 400 
        End If 
     
ErrHandler: 
       Exit Sub 
 
End Sub 
 
Private Sub btnOk_Click() 
 
    '取得新的文本OSD信息 
    If checkShow1.Value = Checked Then 
    formMain.SDK30001.ToShow = True 
    Else 
    formMain.SDK30001.ToShow = False 
    End If 
     
    formMain.SDK30001.ToHeight = CLng(editHeight1.Text) 
    formMain.SDK30001.ToWidth = CLng(editWidth1.Text) 
    formMain.SDK30001.ToSpacing = CLng(editSpacing1.Text) 
    formMain.SDK30001.ToLeft = CLng(editLeft1.Text) 
    formMain.SDK30001.ToTop = CLng(editTop1.Text) 
    formMain.SDK30001.ToText = editText1.Text 
     
    '更新文本OSD 
    Call formMain.SDK30001.UpdateTextOsd 
     
    '取得时间OSD信息 
    If checkShow2.Value = Checked Then 
    formMain.SDK30001.DoShow = True 
    Else 
    formMain.SDK30001.DoShow = False 
    End If 
     
    formMain.SDK30001.DoHeight = CLng(editHeight2.Text) 
    formMain.SDK30001.DoWidth = CLng(editWidth2.Text) 
    formMain.SDK30001.DoSpacing = CLng(editSpacing2.Text) 
    formMain.SDK30001.DoLeft = CLng(editLeft2.Text) 
    formMain.SDK30001.DoTop = CLng(editTop2.Text) 
     
    '更新时间OSD 
    Call formMain.SDK30001.UpdateDateTimeOsd 
     
    '关闭此窗口 
    Call Unload(Me) 
     
End Sub 
 
Private Sub Form_Load() 
 
    '取得文本OSD信息 
    If formMain.SDK30001.ToShow Then 
        checkShow1.Value = Checked 
    End If 
     
    editHeight1.Text = CStr(formMain.SDK30001.ToHeight) 
    editWidth1.Text = CStr(formMain.SDK30001.ToWidth) 
    editSpacing1.Text = CStr(formMain.SDK30001.ToSpacing) 
    editLeft1.Text = CStr(formMain.SDK30001.ToLeft) 
    editTop1.Text = CStr(formMain.SDK30001.ToTop) 
    editText1.Text = formMain.SDK30001.ToText 
     
    '取得时间OSD信息 
    If formMain.SDK30001.DoShow Then 
        checkShow2.Value = Checked 
    End If 
     
    editHeight2.Text = CStr(formMain.SDK30001.DoHeight) 
    editWidth2.Text = CStr(formMain.SDK30001.DoWidth) 
    editSpacing2.Text = CStr(formMain.SDK30001.DoSpacing) 
    editLeft2.Text = CStr(formMain.SDK30001.DoLeft) 
    editTop2.Text = CStr(formMain.SDK30001.DoTop) 
     
End Sub