home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipComp.exe / XceedEncoding.Cab / F112906_Option.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-04-27  |  6.2 KB  |  179 lines

  1. VERSION 5.00
  2. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  3. Begin VB.Form frmOption 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Option"
  6.    ClientHeight    =   2415
  7.    ClientLeft      =   0
  8.    ClientTop       =   285
  9.    ClientWidth     =   2955
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2415
  14.    ScaleWidth      =   2955
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CommandButton cmdCancel 
  18.       Cancel          =   -1  'True
  19.       Caption         =   "Cancel"
  20.       Height          =   315
  21.       Left            =   1725
  22.       TabIndex        =   8
  23.       Top             =   2025
  24.       Width           =   1140
  25.    End
  26.    Begin VB.CommandButton cmdOk 
  27.       Caption         =   "Ok"
  28.       Default         =   -1  'True
  29.       Height          =   315
  30.       Left            =   525
  31.       TabIndex        =   7
  32.       Top             =   2025
  33.       Width           =   1140
  34.    End
  35.    Begin TabDlg.SSTab tabOption 
  36.       Height          =   1815
  37.       Left            =   75
  38.       TabIndex        =   0
  39.       Top             =   75
  40.       Width           =   2790
  41.       _ExtentX        =   4921
  42.       _ExtentY        =   3201
  43.       _Version        =   393216
  44.       Style           =   1
  45.       Tabs            =   2
  46.       TabsPerRow      =   2
  47.       TabHeight       =   520
  48.       TabCaption(0)   =   "Encoding"
  49.       TabPicture(0)   =   "Option.frx":0000
  50.       Tab(0).ControlEnabled=   -1  'True
  51.       Tab(0).Control(0)=   "Label1"
  52.       Tab(0).Control(0).Enabled=   0   'False
  53.       Tab(0).Control(1)=   "fraEndOfLineType"
  54.       Tab(0).Control(1).Enabled=   0   'False
  55.       Tab(0).Control(2)=   "txtMaxLineLen"
  56.       Tab(0).Control(2).Enabled=   0   'False
  57.       Tab(0).ControlCount=   3
  58.       TabCaption(1)   =   "Decoding"
  59.       TabPicture(1)   =   "Option.frx":001C
  60.       Tab(1).ControlEnabled=   0   'False
  61.       Tab(1).Control(0)=   "chkContinueOnInvalidData"
  62.       Tab(1).ControlCount=   1
  63.       Begin VB.CheckBox chkContinueOnInvalidData 
  64.          Alignment       =   1  'Right Justify
  65.          Caption         =   "Continue on invalid data"
  66.          Height          =   240
  67.          Left            =   -74850
  68.          TabIndex        =   6
  69.          Top             =   450
  70.          Value           =   1  'Checked
  71.          Width           =   2490
  72.       End
  73.       Begin VB.TextBox txtMaxLineLen 
  74.          Height          =   285
  75.          Left            =   2100
  76.          TabIndex        =   4
  77.          Text            =   "78"
  78.          Top             =   450
  79.          Width           =   540
  80.       End
  81.       Begin VB.Frame fraEndOfLineType 
  82.          Caption         =   "End of line type"
  83.          Height          =   840
  84.          Left            =   150
  85.          TabIndex        =   1
  86.          Top             =   825
  87.          Width           =   2490
  88.          Begin VB.OptionButton optLf 
  89.             Caption         =   "Line feed only"
  90.             Height          =   195
  91.             Left            =   150
  92.             TabIndex        =   3
  93.             Top             =   525
  94.             Width           =   2190
  95.          End
  96.          Begin VB.OptionButton optCrLf 
  97.             Caption         =   "Carriage return + Line feed"
  98.             Height          =   195
  99.             Left            =   150
  100.             TabIndex        =   2
  101.             Top             =   300
  102.             Value           =   -1  'True
  103.             Width           =   2190
  104.          End
  105.       End
  106.       Begin VB.Label Label1 
  107.          Caption         =   "Maximum line length"
  108.          Height          =   240
  109.          Left            =   150
  110.          TabIndex        =   5
  111.          Top             =   450
  112.          Width           =   1815
  113.       End
  114.    End
  115. Attribute VB_Name = "frmOption"
  116. Attribute VB_GlobalNameSpace = False
  117. Attribute VB_Creatable = False
  118. Attribute VB_PredeclaredId = True
  119. Attribute VB_Exposed = False
  120. ' Xceed Binary Encoding Library - Encoding Manager sample
  121. ' Copyright (c) 2001 Xceed Software Inc.
  122. ' [Option.frm]
  123. ' This form module displays available encoding options.
  124. ' This file is part of the Xceed Binary Encoding Library sample applications.
  125. ' The source code in this file is only intended as a supplement to Xceed
  126. ' Binary Encoding Library's documentation, and is provided "as is", without
  127. ' warranty of any kind, either expressed or implied.
  128. Option Explicit
  129. 'Keep the user response (OK/True or Cancel/False)
  130. Private m_bOk As Boolean
  131. '------------------------------------------------------------------------------------
  132. 'Show the Option form, setting the option values according to the specified
  133. 'parameters.
  134. 'If the user click OK, the new option values will be returned in these parameters
  135. 'and the function will return True.
  136. 'If the user click Cancel, the parameters are not updated and the function will
  137. 'return False.
  138. '------------------------------------------------------------------------------------
  139. Public Function ShowForm(ByRef lMaxLineLen As Long, _
  140.                          ByRef eEOLType As EXBEndOfLineType, _
  141.                          ByRef bContinueOnInvalidData As Boolean) As Boolean
  142.     txtMaxLineLen = LTrim$(Str(lMaxLineLen))
  143.     If eEOLType = bltLf Then
  144.         optLf.Value = True
  145.     Else
  146.         optCrLf.Value = True
  147.     End If
  148.     If bContinueOnInvalidData Then
  149.         chkContinueOnInvalidData.Value = vbChecked
  150.     Else
  151.         chkContinueOnInvalidData.Value = vbUnchecked
  152.     End If
  153.     Call Me.Show(vbModal)
  154.     If m_bOk Then
  155.         lMaxLineLen = Val(txtMaxLineLen)
  156.         If optLf.Value = True Then
  157.             eEOLType = bltLf
  158.         Else
  159.             eEOLType = bltCrLf
  160.         End If
  161.         bContinueOnInvalidData = (chkContinueOnInvalidData.Value = vbChecked)
  162.     End If
  163.     ShowForm = m_bOk
  164.     Unload Me
  165. End Function
  166. Private Sub cmdOk_Click()
  167.     m_bOk = True
  168.     Me.Hide
  169. End Sub
  170. Private Sub cmdCancel_Click()
  171.     Me.Hide
  172. End Sub
  173. Private Sub Form_Load()
  174.     m_bOk = False
  175. End Sub
  176. Private Sub Form_Unload(Cancel As Integer)
  177.     Call cmdCancel_Click
  178. End Sub
  179.