home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form frmOption
- BorderStyle = 3 'Fixed Dialog
- Caption = "Option"
- ClientHeight = 2415
- ClientLeft = 0
- ClientTop = 285
- ClientWidth = 2955
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2415
- ScaleWidth = 2955
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 'CenterOwner
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 315
- Left = 1725
- TabIndex = 8
- Top = 2025
- Width = 1140
- End
- Begin VB.CommandButton cmdOk
- Caption = "Ok"
- Default = -1 'True
- Height = 315
- Left = 525
- TabIndex = 7
- Top = 2025
- Width = 1140
- End
- Begin TabDlg.SSTab tabOption
- Height = 1815
- Left = 75
- TabIndex = 0
- Top = 75
- Width = 2790
- _ExtentX = 4921
- _ExtentY = 3201
- _Version = 393216
- Style = 1
- Tabs = 2
- TabsPerRow = 2
- TabHeight = 520
- TabCaption(0) = "Encoding"
- TabPicture(0) = "Option.frx":0000
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Label1"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "fraEndOfLineType"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "txtMaxLineLen"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).ControlCount= 3
- TabCaption(1) = "Decoding"
- TabPicture(1) = "Option.frx":001C
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "chkContinueOnInvalidData"
- Tab(1).ControlCount= 1
- Begin VB.CheckBox chkContinueOnInvalidData
- Alignment = 1 'Right Justify
- Caption = "Continue on invalid data"
- Height = 240
- Left = -74850
- TabIndex = 6
- Top = 450
- Value = 1 'Checked
- Width = 2490
- End
- Begin VB.TextBox txtMaxLineLen
- Height = 285
- Left = 2100
- TabIndex = 4
- Text = "78"
- Top = 450
- Width = 540
- End
- Begin VB.Frame fraEndOfLineType
- Caption = "End of line type"
- Height = 840
- Left = 150
- TabIndex = 1
- Top = 825
- Width = 2490
- Begin VB.OptionButton optLf
- Caption = "Line feed only"
- Height = 195
- Left = 150
- TabIndex = 3
- Top = 525
- Width = 2190
- End
- Begin VB.OptionButton optCrLf
- Caption = "Carriage return + Line feed"
- Height = 195
- Left = 150
- TabIndex = 2
- Top = 300
- Value = -1 'True
- Width = 2190
- End
- End
- Begin VB.Label Label1
- Caption = "Maximum line length"
- Height = 240
- Left = 150
- TabIndex = 5
- Top = 450
- Width = 1815
- End
- End
- Attribute VB_Name = "frmOption"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- ' Xceed Binary Encoding Library - Encoding Manager sample
- ' Copyright (c) 2001 Xceed Software Inc.
- ' [Option.frm]
- ' This form module displays available encoding options.
- ' This file is part of the Xceed Binary Encoding Library sample applications.
- ' The source code in this file is only intended as a supplement to Xceed
- ' Binary Encoding Library's documentation, and is provided "as is", without
- ' warranty of any kind, either expressed or implied.
- Option Explicit
- 'Keep the user response (OK/True or Cancel/False)
- Private m_bOk As Boolean
- '------------------------------------------------------------------------------------
- 'Show the Option form, setting the option values according to the specified
- 'parameters.
- 'If the user click OK, the new option values will be returned in these parameters
- 'and the function will return True.
- 'If the user click Cancel, the parameters are not updated and the function will
- 'return False.
- '------------------------------------------------------------------------------------
- Public Function ShowForm(ByRef lMaxLineLen As Long, _
- ByRef eEOLType As EXBEndOfLineType, _
- ByRef bContinueOnInvalidData As Boolean) As Boolean
- txtMaxLineLen = LTrim$(Str(lMaxLineLen))
- If eEOLType = bltLf Then
- optLf.Value = True
- Else
- optCrLf.Value = True
- End If
- If bContinueOnInvalidData Then
- chkContinueOnInvalidData.Value = vbChecked
- Else
- chkContinueOnInvalidData.Value = vbUnchecked
- End If
- Call Me.Show(vbModal)
- If m_bOk Then
- lMaxLineLen = Val(txtMaxLineLen)
- If optLf.Value = True Then
- eEOLType = bltLf
- Else
- eEOLType = bltCrLf
- End If
- bContinueOnInvalidData = (chkContinueOnInvalidData.Value = vbChecked)
- End If
- ShowForm = m_bOk
- Unload Me
- End Function
- Private Sub cmdOk_Click()
- m_bOk = True
- Me.Hide
- End Sub
- Private Sub cmdCancel_Click()
- Me.Hide
- End Sub
- Private Sub Form_Load()
- m_bOk = False
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Call cmdCancel_Click
- End Sub
-