home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / leadtools / ocx32.lt / Openopts.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-06-30  |  15.0 KB  |  467 lines

  1. VERSION 4.00
  2. Begin VB.Form OpenOptsFrm 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "File Open Options"
  7.    ClientHeight    =   2370
  8.    ClientLeft      =   5250
  9.    ClientTop       =   2550
  10.    ClientWidth     =   3900
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  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          =   2730
  22.    Left            =   5190
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   2370
  27.    ScaleWidth      =   3900
  28.    Top             =   2250
  29.    Width           =   4020
  30.    Begin VB.PictureBox FileInfoPic 
  31.       Appearance      =   0  'Flat
  32.       BackColor       =   &H00C0C0C0&
  33.       ForeColor       =   &H80000008&
  34.       Height          =   2745
  35.       Left            =   3720
  36.       ScaleHeight     =   2715
  37.       ScaleWidth      =   3825
  38.       TabIndex        =   13
  39.       Top             =   2175
  40.       Width           =   3855
  41.       Begin VB.CommandButton InfoOK 
  42.          Appearance      =   0  'Flat
  43.          BackColor       =   &H80000005&
  44.          Caption         =   "OK"
  45.          Height          =   360
  46.          Left            =   1290
  47.          TabIndex        =   14
  48.          Top             =   2085
  49.          Width           =   1245
  50.       End
  51.       Begin VB.Label InfoPage 
  52.          Appearance      =   0  'Flat
  53.          BackColor       =   &H00C0C0C0&
  54.          Caption         =   "InfoPage"
  55.          ForeColor       =   &H80000008&
  56.          Height          =   225
  57.          Left            =   1440
  58.          TabIndex        =   29
  59.          Top             =   1515
  60.          Width           =   2295
  61.       End
  62.       Begin VB.Label Label5 
  63.          Appearance      =   0  'Flat
  64.          BackColor       =   &H00C0C0C0&
  65.          Caption         =   "Size In Memory:"
  66.          ForeColor       =   &H80000008&
  67.          Height          =   225
  68.          Left            =   30
  69.          TabIndex        =   28
  70.          Top             =   1275
  71.          Width           =   1395
  72.       End
  73.       Begin VB.Label Label4 
  74.          Appearance      =   0  'Flat
  75.          BackColor       =   &H00C0C0C0&
  76.          Caption         =   "Filename:"
  77.          ForeColor       =   &H80000008&
  78.          Height          =   225
  79.          Left            =   0
  80.          TabIndex        =   26
  81.          Top             =   75
  82.          Width           =   870
  83.       End
  84.       Begin VB.Label Label7 
  85.          Appearance      =   0  'Flat
  86.          BackColor       =   &H00C0C0C0&
  87.          Caption         =   "Format:"
  88.          ForeColor       =   &H80000008&
  89.          Height          =   225
  90.          Left            =   45
  91.          TabIndex        =   25
  92.          Top             =   315
  93.          Width           =   690
  94.       End
  95.       Begin VB.Label Label8 
  96.          Appearance      =   0  'Flat
  97.          BackColor       =   &H00C0C0C0&
  98.          Caption         =   "Bits Per Pixel:"
  99.          ForeColor       =   &H80000008&
  100.          Height          =   225
  101.          Left            =   45
  102.          TabIndex        =   24
  103.          Top             =   1035
  104.          Width           =   1275
  105.       End
  106.       Begin VB.Label Label9 
  107.          Appearance      =   0  'Flat
  108.          BackColor       =   &H00C0C0C0&
  109.          Caption         =   "Width:"
  110.          ForeColor       =   &H80000008&
  111.          Height          =   225
  112.          Left            =   45
  113.          TabIndex        =   23
  114.          Top             =   555
  115.          Width           =   960
  116.       End
  117.       Begin VB.Label Label10 
  118.          Appearance      =   0  'Flat
  119.          BackColor       =   &H00C0C0C0&
  120.          Caption         =   "Height:"
  121.          ForeColor       =   &H80000008&
  122.          Height          =   225
  123.          Left            =   45
  124.          TabIndex        =   22
  125.          Top             =   795
  126.          Width           =   870
  127.       End
  128.       Begin VB.Label Label11 
  129.          Appearance      =   0  'Flat
  130.          BackColor       =   &H00C0C0C0&
  131.          Caption         =   "Page:"
  132.          ForeColor       =   &H80000008&
  133.          Height          =   225
  134.          Left            =   45
  135.          TabIndex        =   21
  136.          Top             =   1515
  137.          Width           =   1395
  138.       End
  139.       Begin VB.Label InfoName 
  140.          Appearance      =   0  'Flat
  141.          BackColor       =   &H00C0C0C0&
  142.          Caption         =   "InfoName"
  143.          ForeColor       =   &H80000008&
  144.          Height          =   225
  145.          Left            =   1440
  146.          TabIndex        =   20
  147.          Top             =   75
  148.          Width           =   2300
  149.       End
  150.       Begin VB.Label InfoFormat 
  151.          Appearance      =   0  'Flat
  152.          BackColor       =   &H00C0C0C0&
  153.          Caption         =   "InfoFormat"
  154.          ForeColor       =   &H80000008&
  155.          Height          =   225
  156.          Left            =   1440
  157.          TabIndex        =   19
  158.          Top             =   315
  159.          Width           =   1275
  160.       End
  161.       Begin VB.Label InfoWidth 
  162.          Appearance      =   0  'Flat
  163.          BackColor       =   &H00C0C0C0&
  164.          Caption         =   "InfoWidth"
  165.          ForeColor       =   &H80000008&
  166.          Height          =   225
  167.          Left            =   1440
  168.          TabIndex        =   18
  169.          Top             =   555
  170.          Width           =   1290
  171.       End
  172.       Begin VB.Label InfoHeight 
  173.          Appearance      =   0  'Flat
  174.          BackColor       =   &H00C0C0C0&
  175.          Caption         =   "InfoHeight"
  176.          ForeColor       =   &H80000008&
  177.          Height          =   225
  178.          Left            =   1440
  179.          TabIndex        =   17
  180.          Top             =   795
  181.          Width           =   1155
  182.       End
  183.       Begin VB.Label InfoBPP 
  184.          Appearance      =   0  'Flat
  185.          BackColor       =   &H00C0C0C0&
  186.          Caption         =   "InfoBPP"
  187.          ForeColor       =   &H80000008&
  188.          Height          =   225
  189.          Left            =   1440
  190.          TabIndex        =   16
  191.          Top             =   1035
  192.          Width           =   1155
  193.       End
  194.       Begin VB.Label InfoSizeMem 
  195.          Appearance      =   0  'Flat
  196.          BackColor       =   &H00C0C0C0&
  197.          Caption         =   "InfoSizeMem"
  198.          ForeColor       =   &H80000008&
  199.          Height          =   225
  200.          Left            =   1440
  201.          TabIndex        =   15
  202.          Top             =   1275
  203.          Width           =   1740
  204.       End
  205.    End
  206.    Begin VB.CommandButton Cancel 
  207.       Appearance      =   0  'Flat
  208.       BackColor       =   &H80000005&
  209.       Cancel          =   -1  'True
  210.       Caption         =   "Cancel"
  211.       Height          =   390
  212.       Left            =   2685
  213.       TabIndex        =   12
  214.       Top             =   705
  215.       Width           =   1155
  216.    End
  217.    Begin VB.CommandButton Info 
  218.       Appearance      =   0  'Flat
  219.       BackColor       =   &H80000005&
  220.       Caption         =   "&Info"
  221.       Height          =   390
  222.       Left            =   2685
  223.       TabIndex        =   11
  224.       Top             =   1230
  225.       Width           =   1155
  226.    End
  227.    Begin VB.CommandButton OK 
  228.       Appearance      =   0  'Flat
  229.       BackColor       =   &H80000005&
  230.       Caption         =   "OK"
  231.       Default         =   -1  'True
  232.       Height          =   390
  233.       Left            =   2685
  234.       TabIndex        =   10
  235.       Top             =   180
  236.       Width           =   1155
  237.    End
  238.    Begin VB.CheckBox PaintWhileLoad 
  239.       Alignment       =   1  'Right Justify
  240.       Appearance      =   0  'Flat
  241.       BackColor       =   &H00C0C0C0&
  242.       Caption         =   "Paint &While Load"
  243.       ForeColor       =   &H80000008&
  244.       Height          =   285
  245.       Left            =   210
  246.       TabIndex        =   9
  247.       Top             =   1620
  248.       Width           =   1980
  249.    End
  250.    Begin VB.TextBox PageNumberBox 
  251.       Appearance      =   0  'Flat
  252.       Height          =   285
  253.       Left            =   1530
  254.       TabIndex        =   8
  255.       Top             =   2010
  256.       Width           =   705
  257.    End
  258.    Begin VB.Frame Frame1 
  259.       Appearance      =   0  'Flat
  260.       BackColor       =   &H00C0C0C0&
  261.       Caption         =   "Load As"
  262.       ForeColor       =   &H80000008&
  263.       Height          =   1380
  264.       Left            =   195
  265.       TabIndex        =   0
  266.       Top             =   135
  267.       Width           =   2265
  268.       Begin VB.OptionButton Bit 
  269.          Appearance      =   0  'Flat
  270.          BackColor       =   &H00C0C0C0&
  271.          Caption         =   "&Default"
  272.          ForeColor       =   &H80000008&
  273.          Height          =   240
  274.          Index           =   0
  275.          Left            =   105
  276.          TabIndex        =   27
  277.          Top             =   240
  278.          Width           =   975
  279.       End
  280.       Begin VB.OptionButton Bit 
  281.          Appearance      =   0  'Flat
  282.          BackColor       =   &H00C0C0C0&
  283.          Caption         =   "&32 Bit"
  284.          ForeColor       =   &H80000008&
  285.          Height          =   240
  286.          Index           =   32
  287.          Left            =   1080
  288.          TabIndex        =   6
  289.          Top             =   780
  290.          Width           =   1095
  291.       End
  292.       Begin VB.OptionButton Bit 
  293.          Appearance      =   0  'Flat
  294.          BackColor       =   &H00C0C0C0&
  295.          Caption         =   "&24 Bit"
  296.          ForeColor       =   &H80000008&
  297.          Height          =   240
  298.          Index           =   24
  299.          Left            =   1080
  300.          TabIndex        =   5
  301.          Top             =   510
  302.          Width           =   1095
  303.       End
  304.       Begin VB.OptionButton Bit 
  305.          Appearance      =   0  'Flat
  306.          BackColor       =   &H00C0C0C0&
  307.          Caption         =   "1&6 Bit"
  308.          ForeColor       =   &H80000008&
  309.          Height          =   240
  310.          Index           =   16
  311.          Left            =   1080
  312.          TabIndex        =   4
  313.          Top             =   240
  314.          Width           =   1095
  315.       End
  316.       Begin VB.OptionButton Bit 
  317.          Appearance      =   0  'Flat
  318.          BackColor       =   &H00C0C0C0&
  319.          Caption         =   "&8 Bit"
  320.          ForeColor       =   &H80000008&
  321.          Height          =   240
  322.          Index           =   8
  323.          Left            =   105
  324.          TabIndex        =   3
  325.          Top             =   1050
  326.          Width           =   800
  327.       End
  328.       Begin VB.OptionButton Bit 
  329.          Appearance      =   0  'Flat
  330.          BackColor       =   &H00C0C0C0&
  331.          Caption         =   "&4 Bit"
  332.          ForeColor       =   &H80000008&
  333.          Height          =   240
  334.          Index           =   4
  335.          Left            =   105
  336.          TabIndex        =   2
  337.          Top             =   780
  338.          Width           =   800
  339.       End
  340.       Begin VB.OptionButton Bit 
  341.          Appearance      =   0  'Flat
  342.          BackColor       =   &H00C0C0C0&
  343.          Caption         =   "&1 Bit"
  344.          ForeColor       =   &H80000008&
  345.          Height          =   240
  346.          Index           =   1
  347.          Left            =   105
  348.          TabIndex        =   1
  349.          Top             =   510
  350.          Value           =   -1  'True
  351.          Width           =   800
  352.       End
  353.    End
  354.    Begin LeadLib.LEAD Lead1 
  355.       Height          =   375
  356.       Left            =   2880
  357.       TabIndex        =   30
  358.       Top             =   1800
  359.       Visible         =   0   'False
  360.       Width           =   375
  361.       _version        =   589824
  362.       _extentx        =   661
  363.       _extenty        =   661
  364.       _stockprops     =   101
  365.       scaleheight     =   25
  366.       scalewidth      =   25
  367.       datafield       =   ""
  368.    End
  369.    Begin VB.Label Label1 
  370.       Appearance      =   0  'Flat
  371.       BackColor       =   &H00C0C0C0&
  372.       Caption         =   "&Page To Load:"
  373.       ForeColor       =   &H80000008&
  374.       Height          =   240
  375.       Left            =   210
  376.       TabIndex        =   7
  377.       Top             =   2055
  378.       Width           =   1305
  379.    End
  380. Attribute VB_Name = "OpenOptsFrm"
  381. Attribute VB_Creatable = False
  382. Attribute VB_Exposed = False
  383. Dim nBoxInitWidth As Integer
  384. Dim nBoxInitHeight As Integer
  385. Dim nBoxInfoWidth As Integer
  386. Dim nBoxInfoHeight As Integer
  387. Private Sub BIT_Click(Index As Integer)
  388.     gnOpenOptsBits = Index
  389. End Sub
  390. Private Sub Cancel_Click()
  391. End Sub
  392. Private Sub Form_Load()
  393. Lead1.UnlockSupport L_SUPPORT_EXPRESS, L_KEY_EXPRESS
  394. Lead1.UnlockSupport L_SUPPORT_GIFLZW, L_KEY_GIFLZW
  395. Lead1.UnlockSupport L_SUPPORT_TIFLZW, L_KEY_TIFLZW
  396. Lead1.UnlockSupport L_SUPPORT_MEDICAL, L_KEY_MEDICAL
  397. nBoxInitWidth = Width
  398. nBoxInitHeight = Height
  399. nBoxInfoWidth = 3930
  400. nBoxInfoHeight = 3105
  401. left = (Screen.Width - Width) / 2
  402. top = (Screen.Height - Height) / 2
  403. FileInfoPic.BorderStyle = 0
  404. FileInfoPic.Visible = False
  405. Lead1.Visible = False
  406. End Sub
  407. Private Sub Info_Click()
  408. Dim nPage As Integer
  409. Dim nRet As Integer
  410. Lead1.EnableMethodErrors = False
  411. nRet = Lead1.GetFileInfo(gcOpenOptsFile, 32000)
  412. InfoPage = CStr(Lead1.InfoPage)
  413. If Lead1.InfoPage > Val(PageNumberBox) Then
  414.   nRet = Lead1.GetFileInfo(gcOpenOptsFile, PageNumberBox)
  415. End If
  416. If nRet = 0 Then
  417.   InfoName = gcOpenOptsFile
  418.   InfoFormat = CStr(Lead1.InfoFormat)
  419.   InfoWidth = CStr(Lead1.InfoWidth)
  420.   InfoHeight = CStr(Lead1.InfoHeight)
  421.   InfoBPP = CStr(Lead1.InfoBits)
  422.   InfoPage = Lead1.InfoPage
  423.   InfoSizeMem = CStr(Lead1.InfoSizeMem) & ", Bytes"
  424.   InfoSizeDisk = CStr(Lead1.InfoSizeDisk) & ", Bytes"
  425.   FileInfoPic.left = 0
  426.   FileInfoPic.top = 0
  427.   FileInfoPic.Visible = True
  428.   Width = nBoxInfoWidth
  429.   Height = nBoxInfoHeight
  430.   Msg = "Error '" & CStr(nRet) & "' was generated."
  431.   Style = vbOKOnly
  432.   Title = "FileInfo Error"
  433.   MsgBox Msg, Style, Title
  434.   InfoOK_Click
  435. End If
  436. End Sub
  437. Private Sub InfoOK_Click()
  438. FileInfoPic.Visible = False
  439. Width = nBoxInitWidth
  440. Height = nBoxInitHeight
  441. End Sub
  442. Private Sub OK_Click()
  443. gfOpenOptsGo = True
  444. End Sub
  445. Private Sub PageNumberBox_KeyPress(KeyAscii As Integer)
  446.   Dim nNewValue As Long
  447.   nNewValue = &H7FFFFFFF
  448.   If KeyAscii <= 57 And KeyAscii >= 48 Then
  449.     If PageNumberBox.SelLength = 0 Then
  450.       Select Case PageNumberBox.SelStart
  451.         Case 0
  452.           nNewValue = Val(Chr(KeyAscii) & PageNumberBox.Text)
  453.         Case Len(PageNumberBox.Text)
  454.           nNewValue = Val(PageNumberBox.Text & Chr(KeyAscii))
  455.         Case Else
  456.           nNewValue = Val(left(PageNumberBox.Text, PageNumberBox.SelStart) & Chr(KeyAscii) & right(PageNumberBox.Text, Len(PageNumberBox.Text) - PageNumberBox.SelStart))
  457.       End Select
  458.     Else
  459.       nNewValue = Chr(KeyAscii)
  460.     End If
  461.   End If
  462.   If nNewValue <= 32000 Then
  463.   ElseIf KeyAscii <> 8 Then
  464.     KeyAscii = 0
  465.   End If
  466. End Sub
  467.