home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 November / pcwk_11_98a.iso / Wtestowe / Vistdtk / Install / Data.Z / Exptsetp.FRM < prev    next >
Text File  |  1996-09-04  |  6KB  |  182 lines

  1. VERSION 4.00
  2. Begin VB.Form frmExportSetup 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "Export Setup"
  7.    ClientHeight    =   1920
  8.    ClientLeft      =   2460
  9.    ClientTop       =   1995
  10.    ClientWidth     =   5115
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   2325
  22.    Left            =   2400
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   1920
  27.    ScaleWidth      =   5115
  28.    Top             =   1650
  29.    Width           =   5235
  30.    Begin VB.CommandButton btnCancel 
  31.       Appearance      =   0  'Flat
  32.       BackColor       =   &H80000005&
  33.       Caption         =   "&Cancel"
  34.       Height          =   375
  35.       Left            =   3720
  36.       TabIndex        =   0
  37.       Top             =   480
  38.       Width           =   1275
  39.    End
  40.    Begin VB.CommandButton btnOK 
  41.       Appearance      =   0  'Flat
  42.       BackColor       =   &H80000005&
  43.       Caption         =   "&OK"
  44.       Default         =   -1  'True
  45.       Height          =   375
  46.       Left            =   3720
  47.       TabIndex        =   1
  48.       Top             =   60
  49.       Width           =   1275
  50.    End
  51.    Begin VB.Frame Frame1 
  52.       Appearance      =   0  'Flat
  53.       BackColor       =   &H80000005&
  54.       Caption         =   "File/Clipboard Export Setup"
  55.       ForeColor       =   &H80000008&
  56.       Height          =   1755
  57.       Left            =   120
  58.       TabIndex        =   3
  59.       Top             =   60
  60.       Width           =   3495
  61.       Begin VB.ComboBox ctlSepList 
  62.          Appearance      =   0  'Flat
  63.          Height          =   300
  64.          Left            =   1680
  65.          Style           =   2  'Dropdown List
  66.          TabIndex        =   6
  67.          Top             =   1260
  68.          Width           =   1635
  69.       End
  70.       Begin VB.ComboBox ctlDelList 
  71.          Appearance      =   0  'Flat
  72.          Height          =   300
  73.          Left            =   1680
  74.          Style           =   2  'Dropdown List
  75.          TabIndex        =   5
  76.          Top             =   780
  77.          Width           =   1635
  78.       End
  79.       Begin VB.CheckBox ctlIncFields 
  80.          Appearance      =   0  'Flat
  81.          BackColor       =   &H80000005&
  82.          Caption         =   "Include Field Names"
  83.          ForeColor       =   &H80000008&
  84.          Height          =   255
  85.          Left            =   360
  86.          TabIndex        =   4
  87.          Top             =   360
  88.          Width           =   2115
  89.       End
  90.       Begin VB.Label Label4 
  91.          Alignment       =   1  'Right Justify
  92.          Appearance      =   0  'Flat
  93.          BackColor       =   &H80000005&
  94.          Caption         =   "Field Separator:"
  95.          ForeColor       =   &H80000008&
  96.          Height          =   195
  97.          Left            =   180
  98.          TabIndex        =   2
  99.          Top             =   1320
  100.          Width           =   1365
  101.       End
  102.       Begin VB.Label Label3 
  103.          Alignment       =   1  'Right Justify
  104.          Appearance      =   0  'Flat
  105.          BackColor       =   &H80000005&
  106.          Caption         =   "Text Delimiter:"
  107.          ForeColor       =   &H80000008&
  108.          Height          =   195
  109.          Left            =   300
  110.          TabIndex        =   7
  111.          Top             =   840
  112.          Width           =   1245
  113.       End
  114.    End
  115. End
  116. Attribute VB_Name = "frmExportSetup"
  117. Attribute VB_Creatable = False
  118. Attribute VB_Exposed = False
  119. ' -----------------------------------------------------------------------------
  120. ' Copyright (C) 1993-1996 Visio Corporation. All rights reserved.
  121. '
  122. ' You have a royalty-free right to use, modify, reproduce and distribute
  123. ' the Sample Application Files (and/or any modified version) in any way
  124. ' you find useful, provided that you agree that Visio has no warranty,
  125. ' obligations or liability for any Sample Application Files.
  126. ' -----------------------------------------------------------------------------
  127.  
  128. Option Explicit
  129.  
  130. Private Sub btnCancel_Click()
  131.     Unload frmExportSetup
  132. End Sub
  133.  
  134. Private Sub btnOK_Click()
  135. '------------------------------------
  136. '--- btnOK_Click --------------------
  137. '--
  138. '--   When the user presses OK we copy the values from the setup forms'
  139. '-- controls into the global export variables.
  140. '--
  141.     
  142.     g_bIncFieldNames = -(ctlIncFields.Value Mod 2)
  143.     
  144.     If ctlDelList.ListIndex <> -1 Then
  145.         g_iTextDelimIdx = ctlDelList.ListIndex
  146.     End If
  147.  
  148.     If ctlSepList.ListIndex <> -1 Then
  149.         g_iFieldSepIdx = ctlSepList.ListIndex
  150.     End If
  151.  
  152.     Unload frmExportSetup
  153. End Sub
  154.  
  155. Private Sub Form_Load()
  156. '------------------------------------
  157. '--- Form_Load ----------------------
  158. '--
  159. '--   When the form is loaded we initialize all the form controls to the
  160. '-- export setup values.
  161. '--
  162.  
  163.     Dim I As Integer
  164.  
  165.     If g_bIncFieldNames Then ctlIncFields.Value = 1
  166.  
  167.     ctlDelList.Clear
  168.     ctlSepList.Clear
  169.  
  170.     For I = 0 To UBound(g_TextDelims)
  171.         ctlDelList.AddItem ConvertDelimSep(g_TextDelims(I))
  172.     Next I
  173.     
  174.     For I = 0 To UBound(g_FieldSeps)
  175.         ctlSepList.AddItem ConvertDelimSep(g_FieldSeps(I))
  176.     Next I
  177.  
  178.     ctlDelList.ListIndex = g_iTextDelimIdx
  179.     ctlSepList.ListIndex = g_iFieldSepIdx
  180. End Sub
  181.  
  182.