home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / VIEWERS / VSVIEW / VSVIEW.ZIP / FDESK.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-11-04  |  12.0 KB  |  370 lines

  1. VERSION 2.00
  2. Begin Form fdesk 
  3.    BackColor       =   &H0080FFFF&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5805
  6.    ClientLeft      =   450
  7.    ClientTop       =   870
  8.    ClientWidth     =   8670
  9.    ControlBox      =   0   'False
  10.    Height          =   6300
  11.    Left            =   345
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   5805
  15.    ScaleWidth      =   8670
  16.    Top             =   480
  17.    Width           =   8880
  18.    Begin vsInForm InForm 
  19.       BarColor        =   &H00800080&
  20.       BarColorInactive=   &H00800080&
  21.       BarHeight       =   16
  22.       ButtonsLeft     =   3  '3
  23.       ButtonsRight    =   2  '2
  24.       CapAlign        =   1  'Left Center
  25.       CapColor        =   &H00FFFFFF&
  26.       CapColorInactive=   &H00FFFFFF&
  27.       Caption         =   " VideoSoft SmartDesk"
  28.       ClipMon         =   -1  'True
  29.       ConvInfo        =   FDESK.FRX:0000
  30.       FontBold        =   -1  'True
  31.       FontItalic      =   0   'False
  32.       FontName        =   "Small Fonts"
  33.       FontSize        =   6.75
  34.       FontStrikethru  =   0   'False
  35.       FontUnderline   =   0   'False
  36.       FrameColor      =   &H00C0C0C0&
  37.       FrameColorInactive=   &H00C0C0C0&
  38.       FrameStyle      =   4  'Raised Frame
  39.       FrameWidth      =   10
  40.       Left            =   6600
  41.       PictLeft0       =   FDESK.FRX:000B
  42.       PictLeft1       =   FDESK.FRX:00D5
  43.       PictLeft2       =   FDESK.FRX:019F
  44.       PictRight0      =   FDESK.FRX:0269
  45.       PictRight1      =   FDESK.FRX:0333
  46.       Top             =   4800
  47.    End
  48.    Begin PictureBox Picture4 
  49.       BackColor       =   &H00C0C0C0&
  50.       Height          =   4935
  51.       Left            =   105
  52.       ScaleHeight     =   4125
  53.       ScaleWidth      =   4800
  54.       TabIndex        =   2
  55.       Top             =   240
  56.       Width           =   5100
  57.       Begin vsInForm vsInForm3 
  58.          AcceptFiles     =   -1  'True
  59.          BarColorInactive=   &H00808000&
  60.          BarHeight       =   34
  61.          ButtonsLeft     =   0  '0
  62.          ButtonsRight    =   3  '3
  63.          CapColorInactive=   &H00FFFFFF&
  64.          Caption         =   "Visual Printer"
  65.          ConvInfo        =   FDESK.FRX:03FD
  66.          CustomFrame     =   -1  'True
  67.          FontBold        =   -1  'True
  68.          FontItalic      =   0   'False
  69.          FontName        =   "Arial"
  70.          FontSize        =   12
  71.          FontStrikethru  =   0   'False
  72.          FontUnderline   =   0   'False
  73.          FrameColor      =   &H00C0C0C0&
  74.          FrameColorInactive=   &H00C0C0C0&
  75.          FrameCorners    =   0   'False
  76.          FrameSizing     =   0  'None
  77.          FrameStyle      =   3  'Raised Form
  78.          FrameWidth      =   10
  79.          Left            =   480
  80.          PictRight0      =   FDESK.FRX:0408
  81.          PictRight1      =   FDESK.FRX:0612
  82.          PictRight2      =   FDESK.FRX:07FC
  83.          Top             =   3120
  84.       End
  85.       Begin vsViewPort vsViewPort1 
  86.          BackColor       =   &H00808080&
  87.          ConvInfo        =   FDESK.FRX:09F6
  88.          Height          =   3870
  89.          Left            =   105
  90.          Top             =   105
  91.          VirtualHeight   =   0
  92.          VirtualWidth    =   0
  93.          Width           =   4530
  94.          Begin vsPrinter vsPrinter 
  95.             ConvInfo        =   FDESK.FRX:0A01
  96.             FontName        =   "Arial"
  97.             FontSize        =   24
  98.             HdrColor        =   &H00FF0000&
  99.             HdrFontBold     =   -1  'True
  100.             HdrFontName     =   "Bookman Old Style"
  101.             HdrFontSize     =   18
  102.             Header          =   "|VideoSoft VSView"
  103.             Height          =   2430
  104.             Left            =   105
  105.             Top             =   105
  106.             Width           =   2640
  107.          End
  108.       End
  109.    End
  110.    Begin PictureBox Picture1 
  111.       BackColor       =   &H00C0C0C0&
  112.       Height          =   1590
  113.       Index           =   0
  114.       Left            =   5460
  115.       ScaleHeight     =   840
  116.       ScaleWidth      =   2655
  117.       TabIndex        =   0
  118.       Top             =   210
  119.       Width           =   2955
  120.       Begin vsInForm VSInForm2 
  121.          BarColor        =   &H00808000&
  122.          BarColorInactive=   &H00800080&
  123.          BarHeight       =   30
  124.          BarStyle        =   3  'Raised
  125.          ButtonsLeft     =   0  '0
  126.          CapAlign        =   1  'Left Center
  127.          CapColor        =   &H00FFFFFF&
  128.          CapColorInactive=   &H00FFFFFF&
  129.          Caption         =   "  Most used API Calls"
  130.          ConvInfo        =   FDESK.FRX:0A0C
  131.          CustomFrame     =   -1  'True
  132.          FrameColor      =   &H00C0C0C0&
  133.          FrameColorInactive=   &H00C0C0C0&
  134.          FrameCorners    =   0   'False
  135.          FrameSizing     =   0  'None
  136.          FrameStyle      =   3  'Raised Form
  137.          FrameWidth      =   10
  138.          Index           =   0
  139.          Left            =   -15
  140.          Top             =   -135
  141.       End
  142.       Begin Label lStatus 
  143.          BackStyle       =   0  'Transparent
  144.          FontBold        =   0   'False
  145.          FontItalic      =   0   'False
  146.          FontName        =   "MS Sans Serif"
  147.          FontSize        =   8.25
  148.          FontStrikethru  =   0   'False
  149.          FontUnderline   =   0   'False
  150.          Height          =   645
  151.          Index           =   0
  152.          Left            =   0
  153.          TabIndex        =   1
  154.          Top             =   105
  155.          Width           =   2535
  156.       End
  157.    End
  158.    Begin PictureBox Picture1 
  159.       BackColor       =   &H00C0C0C0&
  160.       Height          =   2220
  161.       Index           =   1
  162.       Left            =   5460
  163.       ScaleHeight     =   1470
  164.       ScaleWidth      =   2655
  165.       TabIndex        =   3
  166.       Top             =   2205
  167.       Width           =   2955
  168.       Begin ComboBox cmb_printers 
  169.          Height          =   300
  170.          Left            =   630
  171.          Style           =   2  'Dropdown List
  172.          TabIndex        =   5
  173.          Top             =   105
  174.          Width           =   1905
  175.       End
  176.       Begin vsInForm VSInForm2 
  177.          BarColor        =   &H00800080&
  178.          BarColorInactive=   &H00800080&
  179.          BarHeight       =   30
  180.          BarStyle        =   3  'Raised
  181.          ButtonsLeft     =   0  '0
  182.          CapAlign        =   1  'Left Center
  183.          CapColor        =   &H00FFFFFF&
  184.          CapColorInactive=   &H00FFFFFF&
  185.          Caption         =   "  Printer Settings"
  186.          ConvInfo        =   FDESK.FRX:0A17
  187.          CustomFrame     =   -1  'True
  188.          FrameColor      =   &H00C0C0C0&
  189.          FrameColorInactive=   &H00C0C0C0&
  190.          FrameCorners    =   0   'False
  191.          FrameSizing     =   0  'None
  192.          FrameStyle      =   3  'Raised Form
  193.          FrameWidth      =   10
  194.          Index           =   2
  195.          Left            =   -15
  196.          Top             =   495
  197.       End
  198.       Begin Label lStatus 
  199.          BackStyle       =   0  'Transparent
  200.          FontBold        =   0   'False
  201.          FontItalic      =   0   'False
  202.          FontName        =   "MS Sans Serif"
  203.          FontSize        =   8.25
  204.          FontStrikethru  =   0   'False
  205.          FontUnderline   =   0   'False
  206.          Height          =   960
  207.          Index           =   1
  208.          Left            =   0
  209.          TabIndex        =   4
  210.          Top             =   525
  211.          Width           =   2640
  212.       End
  213.    End
  214.    Begin Image Pin 
  215.       Height          =   150
  216.       Index           =   0
  217.       Left            =   105
  218.       Picture         =   FDESK.FRX:0A22
  219.       Top             =   0
  220.       Visible         =   0   'False
  221.       Width           =   150
  222.    End
  223.    Begin Image Pin 
  224.       Height          =   150
  225.       Index           =   1
  226.       Left            =   300
  227.       Picture         =   FDESK.FRX:0AEC
  228.       Top             =   60
  229.       Visible         =   0   'False
  230.       Width           =   150
  231.    End
  232. Option Explicit
  233. Sub cmb_printers_Click ()
  234.     Dim s$
  235.     mousepointer = 11
  236.     vsPrinter.Device = cmb_printers.List(cmb_printers.ListIndex)
  237.     s = "Orientation: " + vsPrinter.Orientation + Chr(13)
  238.     s = s + "DPI: " + vsPrinter.DPI + Chr(13)
  239.     s = s + "Port: :" + vsPrinter.Port + Chr(13)
  240.     s = s + "Driver: :" + vsPrinter.Driver
  241.     lStatus(1) = s
  242.     mousepointer = 0
  243. End Sub
  244. Sub Form_Load ()
  245.   Inform.CustomFrame = True
  246.   Dim s$
  247.   'Most Used APIs
  248.   s = "Mem: " + Format(Inform.FreeMemory \ 1024, "#,###") + "k" + Chr(13)
  249.   s = s + "Sys:" + Str(Inform.FreeSystem) + "%"
  250.   s = s + " Usr:" + Str(Inform.FreeUser) + "%"
  251.   s = s + " GDI:" + Str(Inform.FreeGDI) + "%"
  252.   lStatus(0) = s
  253.   ' Display Printer Settings
  254.   Dim i%
  255.   For i = 0 To vsPrinter.NDevices - 1
  256.     cmb_printers.AddItem vsPrinter.Devices(i)
  257.   Next i
  258.   cmb_printers.ListIndex = 0
  259.   vsPrinter.Width = vsPrinter.PageWidth
  260.   vsPrinter.Height = vsPrinter.PageHeight
  261.   VSViewPort1.VirtualWidth = vsPrinter.PageWidth
  262.   VSViewPort1.VirtualHeight = vsPrinter.PageHeight
  263.   Me.Show
  264.   vsPrinter.Preview = True
  265.   MsgBox " Drag TEXT files from File Manager to the Visual Printer"
  266. End Sub
  267. Sub Form_Paint ()
  268.   'vsPrinter.Top = VSViewPort1.VirtualHeight / 2
  269. End Sub
  270. Sub GoPrint (c As Control)
  271.   Dim i%, fn$, fl&
  272.   vsPrinter.PageBorder = 3   'top and bottom
  273.   For i = 0 To c.NumFiles - 1
  274.     ' set header and footer
  275.     fn = c.FileName(i)
  276.     fl = FileLen(fn)
  277.     vsPrinter.FileName = fn
  278.     vsPrinter.Header = fn + "||Page %d"
  279.     vsPrinter.Footer = FileDateTime(fn) + "|VideoSoft VSView|"
  280.     If fl > 10 * 1024 Then
  281.       vsPrinter.Footer = vsPrinter.Footer + Format(fl / 1024, "###,###,###") + " K bytes"
  282.     Else
  283.       vsPrinter.Footer = vsPrinter.Footer + Format(fl, "###,###,###") + " bytes"
  284.     End If
  285.     vsPrinter.Action = 1
  286.   Next
  287.   Form_Paint
  288. End Sub
  289. Sub InForm_ClickLButton (Button As Integer)
  290.   Dim s$
  291.   Select Case Button
  292.     ' button 0 is end
  293.     Case 0
  294.       Unload Me
  295.     ' button 1 is keep on top
  296.     Case 1
  297.       Inform.OnTop = Not Inform.OnTop
  298.       If Inform.OnTop Then
  299.         Inform.PictLeft1 = Pin(1)
  300.       Else
  301.         Inform.PictLeft1 = Pin(0)
  302.       End If
  303.     ' button 2 is help
  304.     Case 2
  305.       s = "Drag files from the file manager into the Visual printer"
  306.       s = s + Chr(13) + "Use pin button to keep the window on top"
  307.       MsgBox s
  308.   End Select
  309. End Sub
  310. Sub InForm_ClickRButton (Button As Integer)
  311.   Select Case Button
  312.     ' button 0 is maximize/restore
  313.     Case 0
  314.       InForm_DblClickCaption
  315.     ' button 1 is minimize
  316.     Case 1
  317.       WindowState = 1
  318.   End Select
  319. End Sub
  320. Sub InForm_DblClickCaption ()
  321.   If WindowState = 0 Then
  322.     WindowState = 2
  323.   ElseIf WindowState = 2 Then
  324.     WindowState = 0
  325.   End If
  326. End Sub
  327. Sub InForm_NewClipboardData ()
  328.  ' eV = Clipboard.GetText()
  329.  ' If eV = "" Then
  330.  '   eV.Picture = Clipboard.GetData()
  331.  ' End If
  332. End Sub
  333. Sub vsInForm3_ClickRButton (Button As Integer)
  334.   Static Zoom%
  335.   mousepointer = 11
  336.   DoEvents
  337.   Select Case Button
  338.       Case 0    'Zoom
  339.           Zoom = Zoom + 20
  340.           If Zoom > 100 Then Zoom = 20
  341.           vsPrinter.Width = vsPrinter.PageWidth * Zoom / 100 * 2.15
  342.           vsPrinter.Height = vsPrinter.PageHeight * Zoom / 100 * 2.15
  343.           VSViewPort1.VirtualWidth = vsPrinter.Width
  344.           VSViewPort1.VirtualHeight = vsPrinter.Height
  345.       Case 1      'Print file
  346.           If vsPrinter.FileName <> "" Then
  347.             vsPrinter.Preview = False
  348.             vsPrinter.Action = 1
  349.             vsPrinter.Preview = True
  350.           End If
  351.       Case 2      'Clear the printer
  352.           vsPrinter.FileName = ""
  353.           vsPrinter.PageBorder = 0   'none
  354.           vsPrinter.Header = ""
  355.           vsPrinter.Footer = ""
  356.           vsPrinter.Action = 3
  357.           vsPrinter.Action = 6
  358.           
  359.   End Select
  360.   mousepointer = 0
  361. End Sub
  362. Sub vsInForm3_DropFile ()
  363.   ' print file
  364.   mousepointer = 11
  365.   vsPrinter.Preview = True
  366.   vsPrinter.PreviewPage = 1
  367.   GoPrint vsInform3
  368.   mousepointer = 0
  369. End Sub
  370.