home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form fdesk
- AutoRedraw = -1 'True
- BackColor = &H0080FFFF&
- Caption = "Form1"
- ClientHeight = 6135
- ClientLeft = 510
- ClientTop = 630
- ClientWidth = 9105
- ClipControls = 0 'False
- ControlBox = 0 'False
- Height = 6540
- Left = 450
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6135
- ScaleWidth = 9105
- Top = 285
- Width = 9225
- Begin PictureBox Picture1
- BackColor = &H00C0C0C0&
- Height = 3915
- Index = 1
- Left = 1590
- ScaleHeight = 3165
- ScaleWidth = 6900
- TabIndex = 1
- Top = 1635
- Width = 7200
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Margins"
- Height = 2535
- Left = 3300
- TabIndex = 11
- Top = 480
- Width = 3525
- Begin TextBox text1
- Alignment = 1 'Right Justify
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Index = 1
- Left = 2385
- MultiLine = -1 'True
- TabIndex = 15
- Text = "Text1"
- Top = 1110
- Width = 990
- End
- Begin TextBox text1
- Alignment = 1 'Right Justify
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Index = 3
- Left = 195
- MultiLine = -1 'True
- TabIndex = 14
- Text = "Text1"
- Top = 1140
- Width = 990
- End
- Begin TextBox text1
- Alignment = 1 'Right Justify
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Index = 2
- Left = 1275
- MultiLine = -1 'True
- TabIndex = 13
- Text = "Text1"
- Top = 2100
- Width = 990
- End
- Begin TextBox text1
- Alignment = 1 'Right Justify
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Index = 0
- Left = 1290
- MultiLine = -1 'True
- TabIndex = 12
- Text = "Text1"
- Top = 210
- Width = 990
- End
- Begin Label LLm
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&Left"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 1
- Left = 240
- TabIndex = 7
- Tag = "FRMarge &Gauche;GB&Left margin;ALL&Left Margin"
- Top = 900
- Width = 270
- End
- Begin Label Ltm
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&Right"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Index = 1
- Left = 2460
- TabIndex = 8
- Tag = "FRMarge &Droite;GB&Right Margin;ALL&Right Margin"
- Top = 840
- Width = 375
- End
- Begin Label Ltm
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&Top"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 195
- Index = 0
- Left = 915
- TabIndex = 9
- Tag = "FRMarge &Haut;GB&Top Margin;ALL&Top Margin"
- Top = 255
- Width = 285
- End
- Begin Label LLm
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&Bottom"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 0
- Left = 735
- TabIndex = 10
- Tag = "FRMarge &Bas;GB&Bottom Margin;ALL&Bottom Margin"
- Top = 2145
- Width = 495
- End
- Begin Image Image1
- Height = 1575
- Left = 1155
- Picture = FDESK.FRX:0000
- Stretch = -1 'True
- Top = 510
- Width = 1230
- End
- End
- Begin Frame Frame4
- BackColor = &H00C0C0C0&
- Caption = "Orientation"
- Height = 945
- Left = 300
- TabIndex = 4
- Top = 2025
- Width = 2910
- Begin OptionButton Option1
- BackColor = &H00C0C0C0&
- Caption = "Portrait"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Index = 0
- Left = 1020
- TabIndex = 6
- Top = 240
- Width = 1185
- End
- Begin OptionButton Option1
- BackColor = &H00C0C0C0&
- Caption = "Landscape"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Index = 1
- Left = 1005
- TabIndex = 5
- Top = 510
- Width = 1185
- End
- Begin Image Image3
- Height = 450
- Index = 1
- Left = 1740
- Picture = FDESK.FRX:4492
- Top = 45
- Visible = 0 'False
- Width = 570
- End
- Begin Image Image3
- Height = 570
- Index = 0
- Left = 285
- Picture = FDESK.FRX:4D7C
- Top = 210
- Visible = 0 'False
- Width = 495
- End
- Begin Image Image4
- Height = 465
- Left = 105
- Top = 225
- Width = 780
- End
- End
- Begin ComboBox cmb_printers
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 300
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 435
- Width = 2850
- End
- Begin vsInForm VSInForm2
- BarColor = &H00800080&
- BarColorInactive= &H00800080&
- BarHeight = 30
- BarStyle = 3 'Raised
- ButtonsLeft = 0 '0
- CapAlign = 1 'Left Center
- CapColor = &H00FFFFFF&
- CapColorInactive= &H00FFFFFF&
- Caption = " Printer Settings"
- ConvInfo = FDESK.FRX:570E
- CustomFrame = -1 'True
- FrameColor = &H00C0C0C0&
- FrameColorInactive= &H00C0C0C0&
- FrameCorners = 0 'False
- FrameSizing = 0 'None
- FrameStyle = 3 'Raised Form
- FrameWidth = 10
- Index = 2
- Left = -15
- Top = 495
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Default Printer"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 240
- Left = 300
- TabIndex = 16
- Top = 180
- Width = 1125
- End
- Begin Label lStatus
- BackStyle = 0 'Transparent
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 960
- Index = 1
- Left = 300
- TabIndex = 2
- Top = 975
- Width = 2640
- End
- End
- Begin vsInForm InForm
- BarColor = &H00800080&
- BarColorInactive= &H00800080&
- BarHeight = 16
- ButtonsLeft = 3 '3
- ButtonsRight = 2 '2
- CapAlign = 1 'Left Center
- CapColor = &H00FFFFFF&
- CapColorInactive= &H00FFFFFF&
- Caption = " VideoSoft SmartDesk"
- ClipMon = -1 'True
- ConvInfo = FDESK.FRX:5719
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Small Fonts"
- FontSize = 6.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- FrameColor = &H00C0C0C0&
- FrameColorInactive= &H00C0C0C0&
- FrameStyle = 4 'Raised Frame
- FrameWidth = 10
- Left = 5835
- PictLeft0 = FDESK.FRX:5724
- PictLeft1 = FDESK.FRX:57EE
- PictLeft2 = FDESK.FRX:58B8
- PictRight0 = FDESK.FRX:5982
- PictRight1 = FDESK.FRX:5A4C
- Top = 480
- End
- Begin PictureBox Picture4
- BackColor = &H00C0C0C0&
- Height = 4935
- Left = 150
- ScaleHeight = 4125
- ScaleWidth = 4800
- TabIndex = 0
- Top = 615
- Width = 5100
- Begin vsInForm vsInForm3
- AcceptFiles = -1 'True
- BarColorInactive= &H00808000&
- BarHeight = 34
- ButtonsLeft = 0 '0
- ButtonsRight = 3 '3
- CapColorInactive= &H00FFFFFF&
- Caption = "Visual Printer"
- ConvInfo = FDESK.FRX:5B16
- CustomFrame = -1 'True
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- FrameColor = &H00C0C0C0&
- FrameColorInactive= &H00C0C0C0&
- FrameCorners = 0 'False
- FrameSizing = 0 'None
- FrameStyle = 3 'Raised Form
- FrameWidth = 10
- Left = 480
- PictRight0 = FDESK.FRX:5B21
- PictRight1 = FDESK.FRX:5D2B
- PictRight2 = FDESK.FRX:5F15
- Top = 3120
- End
- Begin vsViewPort vsViewPort1
- BackColor = &H00808080&
- ConvInfo = FDESK.FRX:610F
- Height = 3870
- Left = 105
- Top = 105
- VirtualHeight = 0
- VirtualWidth = 0
- Width = 4530
- Begin vsPrinter vsPrinter
- ConvInfo = FDESK.FRX:611A
- FontName = "Arial"
- FontSize = 24
- HdrColor = &H00FF0000&
- HdrFontBold = -1 'True
- HdrFontName = "Bookman Old Style"
- HdrFontSize = 18
- Header = "|VideoSoft VSView"
- Height = 2430
- Left = 105
- Top = 105
- Width = 2640
- End
- End
- End
- Begin Image Pin
- Height = 150
- Index = 0
- Left = 105
- Picture = FDESK.FRX:6125
- Top = 0
- Visible = 0 'False
- Width = 150
- End
- Begin Image Pin
- Height = 150
- Index = 1
- Left = 300
- Picture = FDESK.FRX:61EF
- Top = 60
- Visible = 0 'False
- Width = 150
- End
- Option Explicit
- Sub cmb_printers_Click ()
- Dim s$
- mousepointer = 11
- vsPrinter.Device = cmb_printers.List(cmb_printers.ListIndex)
- s = "Port: :" + vsPrinter.Port + Chr(13)
- s = s + "Driver: :" + vsPrinter.Driver
- lStatus(1) = s
- text1(0) = vsPrinter.MarginTop
- text1(1) = vsPrinter.MarginRight
- text1(2) = vsPrinter.MarginBottom
- text1(3) = vsPrinter.MarginLeft
- mousepointer = 0
- End Sub
- Sub Form_Load ()
- Inform.CustomFrame = True
- Dim s$
- ' Display Printer Settings
- Dim i%
- For i = 0 To vsPrinter.NDevices - 1
- cmb_printers.AddItem vsPrinter.Devices(i)
- Next i
- cmb_printers.ListIndex = 0
- vsPrinter.Width = vsPrinter.PageWidth
- vsPrinter.Height = vsPrinter.PageHeight
- VSViewPort1.VirtualWidth = vsPrinter.PageWidth
- VSViewPort1.VirtualHeight = vsPrinter.PageHeight
- option1(vsPrinter.Orientation) = True
- Me.Show
- vsPrinter.Preview = True
- MsgBox " Drag TEXT files from File Manager to the Visual Printer"
- End Sub
- Sub Form_Paint ()
- 'vsPrinter.Top = VSViewPort1.VirtualHeight / 2
- End Sub
- Sub GoPrint (c As Control)
- Dim i%, fn$, fl&
- vsPrinter.PageBorder = 3 'top and bottom
- For i = 0 To c.NumFiles - 1
- ' set header and footer
- fn = c.FileName(i)
- fl = FileLen(fn)
- vsPrinter.FileName = fn
- vsPrinter.Header = fn + "||Page %d"
- vsPrinter.Footer = FileDateTime(fn) + "|VideoSoft VSView|"
- If fl > 10 * 1024 Then
- vsPrinter.Footer = vsPrinter.Footer + Format(fl / 1024, "###,###,###") + " K bytes"
- Else
- vsPrinter.Footer = vsPrinter.Footer + Format(fl, "###,###,###") + " bytes"
- End If
- vsPrinter.Action = 1
- Next
- Form_Paint
- End Sub
- Sub InForm_ClickLButton (Button As Integer)
- Dim s$
- Select Case Button
- ' button 0 is end
- Case 0
- Unload Me
- ' button 1 is keep on top
- Case 1
- Inform.OnTop = Not Inform.OnTop
- If Inform.OnTop Then
- Inform.PictLeft1 = Pin(1)
- Else
- Inform.PictLeft1 = Pin(0)
- End If
- ' button 2 is help
- Case 2
- s = "Drag files from the file manager into the Visual printer"
- s = s + Chr(13) + "Use pin button to keep the window on top"
- MsgBox s
- End Select
- End Sub
- Sub InForm_ClickRButton (Button As Integer)
- Select Case Button
- ' button 0 is maximize/restore
- Case 0
- InForm_DblClickCaption
- ' button 1 is minimize
- Case 1
- WindowState = 1
- End Select
- End Sub
- Sub InForm_DblClickCaption ()
- If WindowState = 0 Then
- WindowState = 2
- ElseIf WindowState = 2 Then
- WindowState = 0
- End If
- End Sub
- Sub InForm_NewClipboardData ()
- ' eV = Clipboard.GetText()
- ' If eV = "" Then
- ' eV.Picture = Clipboard.GetData()
- ' End If
- End Sub
- Sub Option1_Click (Index As Integer)
- vsPrinter.Orientation = Index
- image4 = image3(Index)
- vsPrinter.Width = vsPrinter.PageWidth
- vsPrinter.Height = vsPrinter.PageHeight
- VSViewPort1.VirtualWidth = vsPrinter.PageWidth
- VSViewPort1.VirtualHeight = vsPrinter.PageHeight
- End Sub
- Sub vsInForm3_ClickRButton (Button As Integer)
- Static Zoom%
- mousepointer = 11
- DoEvents
- Select Case Button
- Case 0 'Zoom
- Zoom = Zoom + 20
- If Zoom > 100 Then Zoom = 20
- vsPrinter.Width = vsPrinter.PageWidth * Zoom / 100 * 2.15
- vsPrinter.Height = vsPrinter.PageHeight * Zoom / 100 * 2.15
- VSViewPort1.VirtualWidth = vsPrinter.Width
- VSViewPort1.VirtualHeight = vsPrinter.Height
- Case 1 'Print file
- If vsPrinter.FileName <> "" Then
- vsPrinter.Preview = False
- vsPrinter.Action = 1
- vsPrinter.Preview = True
- End If
- Case 2 'Clear the printer
- vsPrinter.FileName = ""
- vsPrinter.PageBorder = 0 'none
- vsPrinter.Header = ""
- vsPrinter.Footer = ""
- vsPrinter.Action = 3
- vsPrinter.Action = 6
-
- End Select
- mousepointer = 0
- End Sub
- Sub vsInForm3_DropFile ()
- ' print file
- mousepointer = 11
- vsPrinter.Preview = True
- vsPrinter.PreviewPage = 1
- GoPrint vsInform3
- mousepointer = 0
- End Sub
-