home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
- Object = "{84926CA3-2941-101C-816F-0E6013114B7F}#1.0#0"; "IMGSCAN.OCX"
- Object = "{6D940288-9F11-11CE-83FD-02608C3EC08A}#1.0#0"; "IMGEDIT.OCX"
- Object = "{009541A3-3B81-101C-92F3-040224009C02}#1.0#0"; "IMGADMIN.OCX"
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
- Begin VB.Form Form1
- ClientHeight = 5430
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5745
- Icon = "Form1.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 5430
- ScaleWidth = 5745
- StartUpPosition = 2 'Bildschirmmitte
- Begin ScanLibCtl.ImgScan ImgScan1
- Left = 480
- Top = 6120
- _Version = 65536
- _ExtentX = 1402
- _ExtentY = 1296
- _StockProps = 0
- DestImageControl= "ImgEdit1"
- PageOption = 0
- PageType = 6
- CompressionType = 1
- CompressionInfo = 0
- MultiPage = -1 'True
- ScanTo = 5
- End
- Begin VB.PictureBox Layer
- BorderStyle = 0 'Kein
- DrawStyle = 6 'Innen ausgef
- Height = 4455
- Index = 0
- Left = 240
- ScaleHeight = 4455
- ScaleWidth = 4995
- TabIndex = 1
- Top = 720
- Width = 4995
- Begin VB.CommandButton Btn
- Height = 1620
- Index = 0
- Left = 3240
- Picture = "Form1.frx":030A
- Style = 1 'Grafisch
- TabIndex = 4
- Top = 2700
- Width = 1620
- End
- Begin VB.PictureBox ImgEdit1Frame3D
- Height = 4335
- Left = 0
- ScaleHeight = 4629.964
- ScaleMode = 0 'Benutzer
- ScaleWidth = 3045
- TabIndex = 2
- Top = 0
- Width = 3105
- Begin ImgeditLibCtl.ImgEdit ImgEdit1
- Height = 2115
- Left = 840
- TabIndex = 3
- Top = 1080
- Width = 1695
- _Version = 65536
- _ExtentX = 2990
- _ExtentY = 3731
- _StockProps = 0
- ImageControl = "ImgEdit1"
- SelectionRectangleEnabled= 0 'False
- BorderStyle = 0
- DisplayScaleAlgorithm= 4
- End
- End
- Begin VB.Label CounterImg
- Alignment = 2 'Zentriert
- BackColor = &H00000000&
- BorderStyle = 1 'Fest Einfach
- Caption = "01"
- BeginProperty Font
- Name = "Courier New"
- Size = 63.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 1455
- Left = 3360
- TabIndex = 20
- Top = 120
- Width = 1455
- End
- End
- Begin VB.PictureBox Layer
- BorderStyle = 0 'Kein
- DrawStyle = 6 'Innen ausgef
- Height = 4575
- Index = 1
- Left = 240
- ScaleHeight = 4575
- ScaleWidth = 4635
- TabIndex = 5
- Top = 600
- Width = 4635
- Begin VB.PictureBox SubLayer1
- BorderStyle = 0 'Kein
- Height = 2895
- Left = 120
- ScaleHeight = 2895
- ScaleWidth = 3135
- TabIndex = 10
- Top = 120
- Width = 3135
- Begin VB.Frame Frame1
- Height = 855
- Left = 0
- TabIndex = 17
- Top = 2040
- Width = 3135
- Begin VB.CheckBox ShowSpecificSetupChk
- Caption = "Scanner-eigenes Setup anzeigen"
- Height = 255
- Left = 120
- TabIndex = 19
- Top = 240
- Width = 2895
- End
- Begin VB.CheckBox ShowSpecificSetupFirstPageChk
- Caption = "Nur beim ersten Scan"
- Height = 255
- Left = 360
- TabIndex = 18
- Top = 480
- Width = 2175
- End
- End
- Begin VB.Frame Frame2
- Height = 1455
- Left = 0
- TabIndex = 13
- Top = 0
- Width = 3135
- Begin VB.CommandButton Btn
- Caption = "&Bildeinstellungen"
- Height = 300
- Index = 3
- Left = 120
- TabIndex = 16
- Top = 960
- Width = 2820
- End
- Begin VB.CommandButton Btn
- Caption = "&Druckerauswahl"
- Height = 315
- Index = 2
- Left = 120
- TabIndex = 15
- Top = 600
- Width = 2820
- End
- Begin VB.CommandButton Btn
- Caption = "&Scannerauswahl"
- Height = 300
- Index = 1
- Left = 120
- TabIndex = 14
- Top = 240
- Width = 2820
- End
- End
- Begin VB.Frame Frame3
- Height = 615
- Left = 0
- TabIndex = 11
- Top = 1440
- Width = 3135
- Begin VB.CheckBox AskBeforePrintChk
- Caption = "Ausdruck quittieren lassen"
- Height = 255
- Left = 120
- TabIndex = 12
- Top = 240
- Width = 2535
- End
- End
- End
- End
- Begin VB.PictureBox Layer
- BorderStyle = 0 'Kein
- DrawStyle = 6 'Innen ausgef
- Height = 4455
- Index = 2
- Left = 240
- ScaleHeight = 4455
- ScaleWidth = 4995
- TabIndex = 6
- Top = 600
- Width = 4995
- Begin RichTextLib.RichTextBox Rtf
- Height = 3375
- Left = 840
- TabIndex = 7
- Top = 360
- Width = 3135
- _ExtentX = 5530
- _ExtentY = 5953
- _Version = 327681
- BorderStyle = 0
- Enabled = -1 'True
- ReadOnly = -1 'True
- ScrollBars = 2
- TextRTF = $"Form1.frx":2234
- End
- End
- Begin ComctlLib.TabStrip TabStrip1
- Height = 5235
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 5235
- _ExtentX = 9234
- _ExtentY = 9234
- ShowTips = 0 'False
- _Version = 327682
- BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7}
- NumTabs = 4
- BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Kopierer"
- Key = ""
- Object.Tag = ""
- ImageVarType = 2
- EndProperty
- BeginProperty Tab2 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Optionen"
- Key = ""
- Object.Tag = ""
- ImageVarType = 2
- EndProperty
- BeginProperty Tab3 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Hilfe"
- Key = ""
- Object.Tag = ""
- ImageVarType = 2
- EndProperty
- BeginProperty Tab4 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Info"
- Key = ""
- Object.Tag = ""
- ImageVarType = 2
- EndProperty
- EndProperty
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.PictureBox Layer
- BorderStyle = 0 'Kein
- DrawStyle = 6 'Innen ausgef
- Height = 4575
- Index = 3
- Left = 240
- ScaleHeight = 4575
- ScaleWidth = 4635
- TabIndex = 8
- Top = 720
- Width = 4635
- Begin VB.Label WwInfo
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Height = 195
- Left = 840
- TabIndex = 9
- Top = 1080
- Width = 660
- WordWrap = -1 'True
- End
- End
- Begin AdminLibCtl.ImgAdmin ImgAdmin1
- Left = 1560
- Top = 6240
- _Version = 65536
- _ExtentX = 1402
- _ExtentY = 1296
- _StockProps = 0
- CancelError = 0 'False
- PrintStartPage = 0
- PrintEndPage = 0
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '----------------------------------------------------
- '###SCRINT V1.0 (C) 1998 by W.Wirth
- '----------------------------------------------------
- Option Explicit
- Const Title = "Scrint f
- r Windows 95(A)"
- Const cScrintFile = "Scrint.tif"
- Const cLogoFile = "Logo.tif"
- Const cHelpFile = "Scrint.rtf"
- Const dh = 60
- Const dw = 60
- Const phScan = 0
- Const phPrint = 1
- Const phPrinterSel = 2
- Const cPrintNowMsg = "Soll die eingescannte Seite jetzt gedruckt werden?"
- Const SettingIntro = "Wolfgang Wirth's VB-Tools"
- Const SettingAskBeforePrint = "AskBeforePrint"
- Const SettingShowSpecificSetup = "ShowSpecificSetup"
- Const SettingShowSpecificSetupFirstPage = "ShowSpecificSetupFirstPage"
- Const cWwInfo = "Scrint + Scanner + Printer = Fotokopierer" + vbCr + vbCr + _
- "
- 1998 by Wolfgang Wirth" + vbCr + vbCr + _
- "'Verbesserungsvorschl
- ge und konstruktive Kritik sind mir immer willkommen!'" + vbCr + vbCr + _
- "E-Mail: Toolmaker@iname.com" + vbCr + vbCr + _
- "Homepage: http://perso.wanadoo.fr/wolfgang.wirth/"
- Dim ScrintFile As String
- Dim LogoFile As String
- Dim FormatValue As Integer
- Dim SetupValue As Integer
- Dim CurrLayer As Integer
- Dim CopyCounter As Integer
- Dim FirstScanDone As Boolean
- Private Sub AskBeforePrintChk_Click()
- SaveSetting SettingIntro, Title, SettingAskBeforePrint, AskBeforePrintChk.Value
- End Sub
- Private Sub CounterImg_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim i As Integer
- i = ImgAdmin1.PrintNumCopies
- If Button = 2 Then If i > 1 Then SetCopyCounter i - 1 Else Beep
- If Button = 1 Then If i < 99 Then SetCopyCounter i + 1 Else Beep
- End Sub
- Private Sub Form_Load()
- Caption = Title
- WwInfo.Caption = cWwInfo
- SetCurrLayer 0
- ScrintFile = App.Path + "\" + cScrintFile
- LogoFile = App.Path + "\" + cLogoFile
- ImgEdit1.Image = ScrintFile
- ImgEdit1.ImagePalette = wiPaletteRGB24
- ImgScan1.Image = ScrintFile
- ImgScan1.FileType = TIFF
- ImgScan1.MultiPage = False
- ImgScan1.ScanTo = DisplayAndFile
- ImgScan1.PageOption = CreateNewFile
- SetCopyCounter 1
- Rtf.LoadFile cHelpFile
- AskBeforePrintChk.Value = GetSetting(SettingIntro, Title, SettingAskBeforePrint, 0)
- ShowSpecificSetupChk.Value = GetSetting(SettingIntro, Title, SettingShowSpecificSetup, 1)
- ShowSpecificSetupFirstPageChk.Value = GetSetting(SettingIntro, Title, SettingShowSpecificSetupFirstPage, 0)
- End Sub
- Sub SetCopyCounter(i As Integer)
- If i > 99 Then i = 99
- ImgAdmin1.PrintNumCopies = i
- CounterImg.Caption = Right("0" & i, 2)
- End Sub
- Private Sub Btn_Click(Index As Integer)
- '### Taster auswerten
- Select Case Index
- Case 0: 'Copy-Taste
- Scrint phScan
- Case 1: 'Scannerauswahl
- ImgScan1.ShowSelectScanner
- Case 2: 'Druckerauswahl
- Scrint phPrinterSel
- Case 3: 'Scannereinstellungen (SCRINT-eigen)
- ImgScan1.ShowScanPreferences
- End Select
- End Sub
- Private Sub ImgScan1_ScanDone()
- Scrint phPrint
- End Sub
- Private Sub ShowSpecificSetupChk_Click()
- SaveSetting SettingIntro, Title, SettingShowSpecificSetup, ShowSpecificSetupChk.Value
- End Sub
- Private Sub ShowSpecificSetupFirstPageChk_Click()
- SaveSetting SettingIntro, Title, SettingShowSpecificSetupFirstPage, ShowSpecificSetupFirstPageChk.Value
- End Sub
- Sub TabStrip1_Click()
- SetCurrLayer TabStrip1.SelectedItem.Index - 1
- End Sub
- Sub SetCurrLayer(i As Integer)
- CurrLayer = i
- Layer(CurrLayer).ZOrder 0
- End Sub
- Private Sub Form_Resize()
- Dim i As Long
- If WindowState <> 1 Then
- i = 2.8 * Btn(0).Width
- If Width < i Then Width = i
- i = 2.4 * Btn(0).Height
- If Height < i Then Height = i
-
- With TabStrip1
- .Width = ScaleWidth - 2 * dw
- .Height = ScaleHeight - 2 * dh
- .Top = dh
- .Left = dw
- End With
-
- For i = 0 To 3
- With Layer(i)
- .Width = TabStrip1.ClientWidth
- .Height = TabStrip1.ClientHeight
- .Top = TabStrip1.ClientTop
- .Left = TabStrip1.ClientLeft
- End With
- Next
-
- With Btn(0)
- .Top = Layer(0).ScaleHeight - .Height - dh
- .Left = Layer(0).ScaleWidth - .Width - dw
- End With
-
- With CounterImg
- If .Height + 2 * dh < Btn(0).Top Then
- .Width = Btn(0).Width
- '.Height = btn(0).Height
- .Top = dh
- .Left = Btn(0).Left
- .Visible = True
- Else
- .Visible = False
- End If
- End With
-
- With ImgEdit1Frame3D
- .Width = Btn(0).Left - 3 * dw
- .Height = Layer(0).ScaleHeight - 2 * dh
- .Top = dh
- .Left = dw
- End With
-
- ImgEdit1.Width = ImgEdit1Frame3D.ScaleWidth
- ImgEdit1.Height = ImgEdit1Frame3D.ScaleHeight
- ImgEdit1.Top = 0
- ImgEdit1.Left = 0
-
- ImgEdit1.FitTo 0
-
- With Rtf
- .Width = Layer(0).ScaleWidth - 2 * dw
- .Height = Layer(0).ScaleHeight - 2 * dh
- .Top = dh
- .Left = dw
- End With
- End If
- With WwInfo
- .Top = (Layer(0).ScaleHeight - .Height) / 2
- .Left = (Layer(0).ScaleWidth - .Width) / 2
- End With
- With SubLayer1
- .Top = (Layer(0).ScaleHeight - .Height) / 2
- .Left = (Layer(0).ScaleWidth - .Width) / 2
- End With
- End Sub
- Sub Scrint(Phase As Integer)
- Dim bPrintAborted As Boolean
- On Error GoTo ScrintError
- Select Case Phase
- Case phScan '---ScanPhase
- '--- Scanner eig. Setup einblenden?
- ImgScan1.ShowSetupBeforeScan = True
- If ShowSpecificSetupChk.Value = 1 Then
- If ShowSpecificSetupFirstPageChk.Value = 1 Then
- If FirstScanDone Then
- ImgScan1.ShowSetupBeforeScan = False
- End If
- End If
- Else
- ImgScan1.ShowSetupBeforeScan = False
- End If
- '--- Scan vorbereiten und starten
- ImgAdmin1.Image = ScrintFile
- If ImgAdmin1.VerifyImage(0) Then Kill ScrintFile
- ImgScan1.StartScan
- Case phPrint '---DruckPhase
- '--- Scan fertig. Jetzt speichern und dann drucken
- ImgScan1.CloseScanner
- ImgEdit1.SaveAs ScrintFile, , , , , False
- ImgEdit1.FitTo 0
- ImgEdit1.Display
- '--- Quittierung vor Druck gew
- nscht?
- If AskBeforePrintChk.Value = 1 Then
- bPrintAborted = vbNo = MsgBox(cPrintNowMsg, vbYesNo, Title)
- End If
- If Not bPrintAborted Then
- ImgEdit1.PrintImage ImgAdmin1.PrintStartPage, ImgAdmin1.PrintEndPage, _
- ImgAdmin1.PrintOutputFormat, False
- FirstScanDone = True
- End If
- ImgEdit1.ClearDisplay
- Case phPrinterSel '---Druckerauswahl
- ImgAdmin1.Image = LogoFile
- ImgAdmin1.ShowPrintDialog hWnd
- ImgAdmin1.Image = ScrintFile
- SetCopyCounter ImgAdmin1.PrintNumCopies
- End Select
- On Error GoTo 0
- Exit Sub
- '#############################################
- ScrintError:
- MsgBox "Es kam zu folgendem Problem:" + vbCr + vbCr + Err.Description & _
- " (" & Err.Number & ")" + vbCr + vbCr + "Ort: " & Err.Source + vbCr + vbCr + _
- "Phase: " & Phase, vbCritical, Title
- Resume Next
- End Sub
-