home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 1999 October / PCpro_1999_10.ISO / Tools / saxit95 / Sources / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-07-14  |  13.5 KB  |  412 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  3. Object = "{84926CA3-2941-101C-816F-0E6013114B7F}#1.0#0"; "IMGSCAN.OCX"
  4. Object = "{6D940288-9F11-11CE-83FD-02608C3EC08A}#1.0#0"; "IMGEDIT.OCX"
  5. Object = "{E1A6B8A3-3603-101C-AC6E-040224009C02}#1.0#0"; "IMGTHUMB.OCX"
  6. Object = "{009541A3-3B81-101C-92F3-040224009C02}#1.0#0"; "IMGADMIN.OCX"
  7. Begin VB.Form Form1 
  8.    BorderStyle     =   1  'Fest Einfach
  9.    Caption         =   "Sax-It f
  10. r Windows"
  11.    ClientHeight    =   5115
  12.    ClientLeft      =   45
  13.    ClientTop       =   330
  14.    ClientWidth     =   7635
  15.    Icon            =   "Form1.frx":0000
  16.    LinkTopic       =   "Form1"
  17.    MaxButton       =   0   'False
  18.    ScaleHeight     =   5115
  19.    ScaleWidth      =   7635
  20.    StartUpPosition =   2  'Bildschirmmitte
  21.    Begin ScanLibCtl.ImgScan ImgScan1 
  22.       Left            =   1260
  23.       Top             =   7140
  24.       _Version        =   65536
  25.       _ExtentX        =   1402
  26.       _ExtentY        =   1296
  27.       _StockProps     =   0
  28.       DestImageControl=   "ImgEdit1"
  29.       PageOption      =   0
  30.       PageType        =   6
  31.       CompressionType =   1
  32.       CompressionInfo =   0
  33.       MultiPage       =   -1  'True
  34.       ScanTo          =   1
  35.    End
  36.    Begin VB.Frame Frame5 
  37.       Caption         =   "Scan-Faxformat"
  38.       Height          =   1515
  39.       Left            =   5460
  40.       TabIndex        =   19
  41.       Top             =   1440
  42.       Width           =   2115
  43.       Begin VB.OptionButton FormatOpt 
  44.          Caption         =   "Gleiche Pi&xelmenge"
  45.          Height          =   195
  46.          Index           =   0
  47.          Left            =   120
  48.          TabIndex        =   22
  49.          Top             =   300
  50.          Width           =   1875
  51.       End
  52.       Begin VB.OptionButton FormatOpt 
  53.          Caption         =   "Gleiche &Gr
  54.          Height          =   195
  55.          Index           =   1
  56.          Left            =   120
  57.          TabIndex        =   21
  58.          Top             =   660
  59.          Width           =   1815
  60.       End
  61.       Begin VB.OptionButton FormatOpt 
  62.          Caption         =   "Auf Seitengr
  63. e &anpassen"
  64.          Height          =   375
  65.          Index           =   2
  66.          Left            =   120
  67.          TabIndex        =   20
  68.          Top             =   960
  69.          Width           =   1635
  70.       End
  71.    End
  72.    Begin VB.Frame Frame4 
  73.       Caption         =   "Steuerung"
  74.       Height          =   1995
  75.       Left            =   5460
  76.       TabIndex        =   11
  77.       Top             =   3060
  78.       Width           =   2115
  79.       Begin VB.CommandButton Btn 
  80.          Caption         =   "&Scannen"
  81.          Height          =   735
  82.          Index           =   0
  83.          Left            =   120
  84.          TabIndex        =   15
  85.          Top             =   300
  86.          Width           =   900
  87.       End
  88.       Begin VB.CommandButton Btn 
  89.          Caption         =   "&Ende"
  90.          Height          =   735
  91.          Index           =   1
  92.          Left            =   1080
  93.          TabIndex        =   14
  94.          Top             =   1140
  95.          Width           =   900
  96.       End
  97.       Begin VB.CommandButton Btn 
  98.          Caption         =   "&Faxen"
  99.          Height          =   735
  100.          Index           =   2
  101.          Left            =   1080
  102.          TabIndex        =   13
  103.          Top             =   300
  104.          Width           =   900
  105.       End
  106.       Begin VB.CommandButton Btn 
  107.          Caption         =   "&Info"
  108.          Height          =   735
  109.          Index           =   3
  110.          Left            =   120
  111.          TabIndex        =   12
  112.          Top             =   1140
  113.          Width           =   900
  114.       End
  115.    End
  116.    Begin VB.Frame Frame3 
  117.       Caption         =   "Scanner-Setup anzeigen"
  118.       Height          =   1275
  119.       Left            =   5460
  120.       TabIndex        =   10
  121.       Top             =   60
  122.       Width           =   2115
  123.       Begin VB.OptionButton SetupOpt 
  124.          Caption         =   "&Immer"
  125.          Height          =   195
  126.          Index           =   2
  127.          Left            =   120
  128.          TabIndex        =   18
  129.          Top             =   900
  130.          Width           =   1635
  131.       End
  132.       Begin VB.OptionButton SetupOpt 
  133.          Caption         =   "Nur bei der &1. Seite"
  134.          Height          =   195
  135.          Index           =   1
  136.          Left            =   120
  137.          TabIndex        =   17
  138.          Top             =   600
  139.          Width           =   1815
  140.       End
  141.       Begin VB.OptionButton SetupOpt 
  142.          Caption         =   "&Nie"
  143.          Height          =   195
  144.          Index           =   0
  145.          Left            =   120
  146.          TabIndex        =   16
  147.          Top             =   300
  148.          Width           =   1635
  149.       End
  150.    End
  151.    Begin VB.Frame CurrPageFrame 
  152.       Caption         =   "Aktuelle Seite"
  153.       Height          =   4995
  154.       Left            =   2040
  155.       TabIndex        =   3
  156.       Top             =   60
  157.       Width           =   3375
  158.       Begin VB.CommandButton Btn 
  159.          Caption         =   "1&00%"
  160.          Height          =   315
  161.          Index           =   5
  162.          Left            =   2100
  163.          TabIndex        =   23
  164.          Top             =   4560
  165.          Width           =   540
  166.       End
  167.       Begin VB.CommandButton Btn 
  168.          Caption         =   "A&lles"
  169.          Height          =   315
  170.          Index           =   4
  171.          Left            =   2700
  172.          TabIndex        =   8
  173.          Top             =   4560
  174.          Width           =   540
  175.       End
  176.       Begin ComctlLib.Slider ZoomSlider 
  177.          Height          =   435
  178.          Left            =   780
  179.          TabIndex        =   7
  180.          Top             =   4500
  181.          Width           =   1275
  182.          _ExtentX        =   2249
  183.          _ExtentY        =   767
  184.          _Version        =   327682
  185.          LargeChange     =   100
  186.          Min             =   2
  187.          Max             =   400
  188.          SelStart        =   2
  189.          TickFrequency   =   20
  190.          Value           =   2
  191.       End
  192.       Begin VB.PictureBox ImgEdit1Frame3D 
  193.          Height          =   4215
  194.          Left            =   120
  195.          ScaleHeight     =   4500
  196.          ScaleMode       =   0  'Benutzer
  197.          ScaleWidth      =   3045
  198.          TabIndex        =   4
  199.          Top             =   240
  200.          Width           =   3105
  201.          Begin ImgeditLibCtl.ImgEdit ImgEdit1 
  202.             Height          =   3555
  203.             Left            =   300
  204.             TabIndex        =   5
  205.             Top             =   300
  206.             Width           =   2415
  207.             _Version        =   65536
  208.             _ExtentX        =   4260
  209.             _ExtentY        =   6271
  210.             _StockProps     =   0
  211.             ImageControl    =   "ImgEdit1"
  212.             SelectionRectangleEnabled=   0   'False
  213.             BorderStyle     =   0
  214.             DisplayScaleAlgorithm=   4
  215.          End
  216.       End
  217.       Begin VB.Label ZoomLbl 
  218.          Caption         =   "&Zoom (100%):"
  219.          Height          =   435
  220.          Left            =   120
  221.          TabIndex        =   9
  222.          Top             =   4500
  223.          Width           =   675
  224.          WordWrap        =   -1  'True
  225.       End
  226.    End
  227.    Begin VB.Frame Frame1 
  228.       Caption         =   "Seiten
  229. bersicht"
  230.       Height          =   4995
  231.       Left            =   60
  232.       TabIndex        =   0
  233.       Top             =   60
  234.       Width           =   1935
  235.       Begin VB.PictureBox ImgThumbnail1Frame3D 
  236.          Height          =   4215
  237.          Left            =   120
  238.          ScaleHeight     =   4155
  239.          ScaleWidth      =   1635
  240.          TabIndex        =   1
  241.          Top             =   240
  242.          Width           =   1695
  243.          Begin ThumbnailLibCtl.ImgThumbnail ImgThumbnail1 
  244.             Height          =   2955
  245.             Left            =   300
  246.             TabIndex        =   2
  247.             Top             =   1020
  248.             Width           =   975
  249.             _Version        =   65536
  250.             _ExtentX        =   1720
  251.             _ExtentY        =   5212
  252.             _StockProps     =   0
  253.             BorderStyle     =   0
  254.             ThumbHeight     =   120
  255.             ThumbCaptionStyle=   3
  256.             BeginProperty ThumbCaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  257.                Name            =   "MS Sans Serif"
  258.                Size            =   8.25
  259.                Charset         =   0
  260.                Weight          =   400
  261.                Underline       =   0   'False
  262.                Italic          =   0   'False
  263.                Strikethrough   =   0   'False
  264.             EndProperty
  265.             ThumbCaption    =   "Seite #"
  266.          End
  267.       End
  268.       Begin VB.Label CountLbl 
  269.          BackStyle       =   0  'Transparent
  270.          BorderStyle     =   1  'Fest Einfach
  271.          Height          =   255
  272.          Left            =   120
  273.          TabIndex        =   6
  274.          Top             =   4560
  275.          Width           =   1695
  276.       End
  277.    End
  278.    Begin AdminLibCtl.ImgAdmin ImgAdmin1 
  279.       Left            =   2100
  280.       Top             =   7140
  281.       _Version        =   65536
  282.       _ExtentX        =   1402
  283.       _ExtentY        =   1296
  284.       _StockProps     =   0
  285.       PrintStartPage  =   0
  286.       PrintEndPage    =   0
  287.    End
  288. Attribute VB_Name = "Form1"
  289. Attribute VB_GlobalNameSpace = False
  290. Attribute VB_Creatable = False
  291. Attribute VB_PredeclaredId = True
  292. Attribute VB_Exposed = False
  293. '----------------------------------------------------
  294. '###SAX-IT V1.0 (C) 1997/98 by W.Wirth
  295. '----------------------------------------------------
  296. Option Explicit
  297. Const Title = "Sax-It f
  298. r Windows 95"
  299. Const cCurrFaxFile = "tmp.tif"
  300. Dim CurrFaxFile As String
  301. Dim FormatValue As Integer
  302. Dim SetupValue As Integer
  303. Private Sub Btn_Click(Index As Integer)
  304.     '### Taster auswerten
  305.     Select Case Index
  306.         Case 0: 'SCAN
  307.             If SetupValue = 0 Then '### nie
  308.                 ImgScan1.ShowSetupBeforeScan = False
  309.             ElseIf SetupValue = 1 Then '### nur beim 1. mal
  310.                 ImgScan1.ShowSetupBeforeScan = Not ImgEdit1.ImageDisplayed
  311.             ElseIf SetupValue = 2 Then '### immer
  312.                 ImgScan1.ShowSetupBeforeScan = True
  313.             End If
  314.             ImgScan1.StartScan
  315.         Case 2: 'FAX
  316.             ImgEdit1.PrintImage 0, 0, FormatValue, False, "Microsoft Fax", "", ""
  317.         Case 3: 'INFO
  318.             ww_info Title, "... macht aus Scanner und Modem ein komfortables Fax-Ger
  319.         Case 1: 'END
  320.             Unload Me
  321.         '-------------------------------------------
  322.         Case 4: 'ALLES
  323.             DoZoom -1, False
  324.         Case 5: '100%
  325.             DoZoom 100, False
  326.     End Select
  327. End Sub
  328. Private Sub Form_Load()
  329.     '### Div. Controls ausrichten
  330.     ImgEdit1.Width = ImgEdit1Frame3D.ScaleWidth
  331.     ImgEdit1.Height = ImgEdit1Frame3D.ScaleHeight
  332.     ImgEdit1.Top = 0
  333.     ImgEdit1.Left = 0
  334.     ImgThumbnail1.Width = ImgThumbnail1Frame3D.ScaleWidth
  335.     ImgThumbnail1.Height = ImgThumbnail1Frame3D.ScaleHeight
  336.     ImgThumbnail1.Top = 0
  337.     ImgThumbnail1.Left = 0
  338.     SetupOpt(1).Value = True
  339.     FormatOpt(1).Value = True
  340.     '### TMP-Datei f
  341. r Faxdaten vorbereiten
  342.     CurrFaxFile = App.Path + "\" + cCurrFaxFile
  343.     ImgScan1.Image = CurrFaxFile
  344.     ImgScan1.ScanTo = FaxOnly
  345.     ImgScan1.PageOption = AppendPages
  346.     ImgAdmin1.Image = CurrFaxFile
  347.     ImgEdit1.Image = CurrFaxFile
  348.     If ImgAdmin1.VerifyImage(0) Then Kill CurrFaxFile
  349. End Sub
  350. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  351.     '### vor dem Ende noch Faxdatei l
  352. schen
  353.     If ImgAdmin1.VerifyImage(0) Then Kill CurrFaxFile
  354. End Sub
  355. Private Sub FormatOpt_Click(Index As Integer)
  356.     '### Fax-Format sichern
  357.     FormatValue = Index
  358. End Sub
  359. Private Sub ImgThumbnail1_Click(ByVal ThumbNumber As Long)
  360.     '### Thumbnail wurde geklickt -> Bildchen als akt. Seite darstellen
  361.     ImgEdit1.Page = ThumbNumber
  362.     ImgEdit1.Display
  363.     ShowCurrPageInFrameTitle
  364. End Sub
  365. Private Sub Setupopt_Click(Index As Integer)
  366.     '### Scansetup zeigen oder nicht?
  367.     SetupValue = Index
  368. End Sub
  369. Sub DoZoom(ZoomFaktor As Single, SliderFlag As Boolean)
  370.     '### Service f
  371. r die div. Zoom-Controls
  372.     ImgEdit1.Display
  373.     If ZoomFaktor = -1 Then
  374.         ImgEdit1.FitTo 0
  375.         ZoomFaktor = ImgEdit1.Zoom
  376.     Else
  377.         ImgEdit1.Zoom = ZoomFaktor
  378.     End If
  379.     If Not SliderFlag Then ZoomSlider.Value = ZoomFaktor
  380.     ZoomLbl.Caption = "Zoom (" & ZoomFaktor & "%):"
  381.     ImgEdit1.Display
  382. End Sub
  383. Private Sub ZoomSlider_Scroll()
  384.     '### Regler wurde bedient
  385.     DoZoom ZoomSlider.Value, True
  386. End Sub
  387. Sub ShowCurrPageInFrameTitle()
  388.     '### Service f
  389. r akt. Seite
  390.     CurrPageFrame.Caption = "Aktuelle Seite: " & ImgEdit1.Page
  391. End Sub
  392. Sub ww_info(t As String, s As String)
  393.     MsgBox s + vbCr + vbCr + "
  394.  1996 - '98 by Wolfgang Wirth" + vbCr + vbCr + "'Verbesserungsvorschl
  395. ge und konstruktive" + vbCr + "Kritik sind mir immer willkommen!'" + vbCr + vbCr + "E-Mail: Toolmaker@iname.com", 64, t
  396. End Sub
  397. Private Sub ImgScan1_ScanDone()
  398. '### Seite komplett angekommen
  399. Dim s As String
  400. Dim i As Long
  401.     ImgScan1.CloseScanner
  402.     DoZoom -1, False
  403.     ImgThumbnail1.Image = ImgEdit1.Image
  404.     i = ImgEdit1.PageCount
  405.     If i Then
  406.         s = i & " Seite"
  407.         If i > 1 Then s = s + "n"
  408.     End If
  409.     CountLbl.Caption = s
  410.     ShowCurrPageInFrameTitle
  411. End Sub
  412.