home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Print_and_210872462008.psc / frmMain.frm < prev    next >
Text File  |  2008-04-06  |  12KB  |  379 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BackColor       =   &H00E0E0E0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "                                     Select and Print Pictures"
  6.    ClientHeight    =   9345
  7.    ClientLeft      =   45
  8.    ClientTop       =   435
  9.    ClientWidth     =   6945
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   9345
  16.    ScaleWidth      =   6945
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.CommandButton cmdExit 
  19.       Caption         =   "EXIT"
  20.       BeginProperty Font 
  21.          Name            =   "MS Sans Serif"
  22.          Size            =   9.75
  23.          Charset         =   0
  24.          Weight          =   700
  25.          Underline       =   0   'False
  26.          Italic          =   0   'False
  27.          Strikethrough   =   0   'False
  28.       EndProperty
  29.       Height          =   510
  30.       Left            =   5100
  31.       TabIndex        =   15
  32.       Top             =   7755
  33.       Width           =   1200
  34.    End
  35.    Begin Project1.StrokeText StrokeText1 
  36.       Height          =   840
  37.       Left            =   780
  38.       TabIndex        =   13
  39.       Top             =   8460
  40.       Width           =   5355
  41.       _ExtentX        =   9446
  42.       _ExtentY        =   1482
  43.       Caption         =   "Print and Save"
  44.       Shadow          =   -1  'True
  45.       TStyle          =   2
  46.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  47.          Name            =   "Albert"
  48.          Size            =   36
  49.          Charset         =   0
  50.          Weight          =   400
  51.          Underline       =   0   'False
  52.          Italic          =   0   'False
  53.          Strikethrough   =   0   'False
  54.       EndProperty
  55.    End
  56.    Begin VB.PictureBox picPreview 
  57.       BackColor       =   &H00E0E0E0&
  58.       BorderStyle     =   0  'None
  59.       Height          =   1155
  60.       Left            =   9015
  61.       ScaleHeight     =   1155
  62.       ScaleWidth      =   1575
  63.       TabIndex        =   11
  64.       Top             =   3495
  65.       Width           =   1575
  66.    End
  67.    Begin VB.CommandButton cmdSPP 
  68.       Caption         =   "Show Print Preview"
  69.       Enabled         =   0   'False
  70.       BeginProperty Font 
  71.          Name            =   "MS Sans Serif"
  72.          Size            =   9.75
  73.          Charset         =   0
  74.          Weight          =   700
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   510
  80.       Left            =   2280
  81.       TabIndex        =   10
  82.       Top             =   7755
  83.       Width           =   2490
  84.    End
  85.    Begin VB.PictureBox picDisplay 
  86.       AutoRedraw      =   -1  'True
  87.       BackColor       =   &H00FFFFFF&
  88.       BorderStyle     =   0  'None
  89.       Height          =   1680
  90.       Index           =   7
  91.       Left            =   3570
  92.       ScaleHeight     =   1680
  93.       ScaleWidth      =   2640
  94.       TabIndex        =   9
  95.       Top             =   5805
  96.       Width           =   2640
  97.    End
  98.    Begin VB.PictureBox picDisplay 
  99.       AutoRedraw      =   -1  'True
  100.       BackColor       =   &H00FFFFFF&
  101.       BorderStyle     =   0  'None
  102.       Height          =   1680
  103.       Index           =   6
  104.       Left            =   720
  105.       ScaleHeight     =   1680
  106.       ScaleWidth      =   2640
  107.       TabIndex        =   8
  108.       Top             =   5805
  109.       Width           =   2640
  110.    End
  111.    Begin VB.PictureBox picDisplay 
  112.       AutoRedraw      =   -1  'True
  113.       BackColor       =   &H00FFFFFF&
  114.       BorderStyle     =   0  'None
  115.       Height          =   1680
  116.       Index           =   5
  117.       Left            =   3570
  118.       ScaleHeight     =   1680
  119.       ScaleWidth      =   2640
  120.       TabIndex        =   7
  121.       Top             =   3960
  122.       Width           =   2640
  123.    End
  124.    Begin VB.PictureBox picDisplay 
  125.       AutoRedraw      =   -1  'True
  126.       BackColor       =   &H00FFFFFF&
  127.       BorderStyle     =   0  'None
  128.       Height          =   1680
  129.       Index           =   4
  130.       Left            =   720
  131.       ScaleHeight     =   1680
  132.       ScaleWidth      =   2640
  133.       TabIndex        =   6
  134.       Top             =   3960
  135.       Width           =   2640
  136.    End
  137.    Begin VB.CommandButton cmdAddPix 
  138.       Caption         =   "Get Picture"
  139.       BeginProperty Font 
  140.          Name            =   "MS Sans Serif"
  141.          Size            =   9.75
  142.          Charset         =   0
  143.          Weight          =   700
  144.          Underline       =   0   'False
  145.          Italic          =   0   'False
  146.          Strikethrough   =   0   'False
  147.       EndProperty
  148.       Height          =   510
  149.       Left            =   615
  150.       TabIndex        =   1
  151.       Top             =   7755
  152.       Width           =   1395
  153.    End
  154.    Begin VB.PictureBox picMain 
  155.       BackColor       =   &H00FFFFFF&
  156.       Height          =   7440
  157.       Left            =   600
  158.       ScaleHeight     =   7380
  159.       ScaleWidth      =   5640
  160.       TabIndex        =   0
  161.       Top             =   195
  162.       Width           =   5700
  163.       Begin VB.PictureBox picDisplay 
  164.          AutoRedraw      =   -1  'True
  165.          BackColor       =   &H00FFFFFF&
  166.          BorderStyle     =   0  'None
  167.          Height          =   1680
  168.          Index           =   3
  169.          Left            =   2940
  170.          ScaleHeight     =   1680
  171.          ScaleWidth      =   2640
  172.          TabIndex        =   5
  173.          Top             =   1905
  174.          Width           =   2640
  175.       End
  176.       Begin VB.PictureBox picDisplay 
  177.          AutoRedraw      =   -1  'True
  178.          BackColor       =   &H00FFFFFF&
  179.          BorderStyle     =   0  'None
  180.          Height          =   1680
  181.          Index           =   2
  182.          Left            =   90
  183.          ScaleHeight     =   1680
  184.          ScaleWidth      =   2640
  185.          TabIndex        =   4
  186.          Top             =   1905
  187.          Width           =   2640
  188.       End
  189.       Begin VB.PictureBox picDisplay 
  190.          AutoRedraw      =   -1  'True
  191.          BackColor       =   &H00FFFFFF&
  192.          BorderStyle     =   0  'None
  193.          Height          =   1680
  194.          Index           =   1
  195.          Left            =   2940
  196.          ScaleHeight     =   1680
  197.          ScaleWidth      =   2640
  198.          TabIndex        =   3
  199.          Top             =   60
  200.          Width           =   2640
  201.       End
  202.       Begin VB.PictureBox picDisplay 
  203.          AutoRedraw      =   -1  'True
  204.          BackColor       =   &H00FFFFFF&
  205.          BorderStyle     =   0  'None
  206.          Height          =   1680
  207.          Index           =   0
  208.          Left            =   90
  209.          ScaleHeight     =   1680
  210.          ScaleWidth      =   2640
  211.          TabIndex        =   2
  212.          Top             =   60
  213.          Width           =   2640
  214.       End
  215.       Begin VB.Shape Shape1 
  216.          BorderColor     =   &H0000C000&
  217.          BorderWidth     =   2
  218.          Height          =   1770
  219.          Index           =   7
  220.          Left            =   2910
  221.          Top             =   5550
  222.          Width           =   2715
  223.       End
  224.       Begin VB.Shape Shape1 
  225.          BorderColor     =   &H0000C000&
  226.          BorderWidth     =   2
  227.          Height          =   1770
  228.          Index           =   6
  229.          Left            =   60
  230.          Top             =   5550
  231.          Width           =   2715
  232.       End
  233.       Begin VB.Shape Shape1 
  234.          BorderColor     =   &H0000C000&
  235.          BorderWidth     =   2
  236.          Height          =   1755
  237.          Index           =   5
  238.          Left            =   2910
  239.          Top             =   3705
  240.          Width           =   2715
  241.       End
  242.       Begin VB.Shape Shape1 
  243.          BorderColor     =   &H0000C000&
  244.          BorderWidth     =   2
  245.          Height          =   1755
  246.          Index           =   4
  247.          Left            =   60
  248.          Top             =   3705
  249.          Width           =   2715
  250.       End
  251.       Begin VB.Shape Shape1 
  252.          BorderColor     =   &H0000C000&
  253.          BorderWidth     =   2
  254.          Height          =   1755
  255.          Index           =   3
  256.          Left            =   2910
  257.          Top             =   1875
  258.          Width           =   2715
  259.       End
  260.       Begin VB.Shape Shape1 
  261.          BorderColor     =   &H0000C000&
  262.          BorderWidth     =   2
  263.          Height          =   1755
  264.          Index           =   2
  265.          Left            =   60
  266.          Top             =   1875
  267.          Width           =   2715
  268.       End
  269.       Begin VB.Shape Shape1 
  270.          BorderColor     =   &H0000C000&
  271.          BorderWidth     =   2
  272.          Height          =   1755
  273.          Index           =   1
  274.          Left            =   2910
  275.          Top             =   30
  276.          Width           =   2715
  277.       End
  278.       Begin VB.Shape Shape1 
  279.          BorderColor     =   &H0000C000&
  280.          BorderWidth     =   2
  281.          Height          =   1755
  282.          Index           =   0
  283.          Left            =   60
  284.          Top             =   30
  285.          Width           =   2715
  286.       End
  287.    End
  288.    Begin VB.Label Label2 
  289.       BackStyle       =   0  'Transparent
  290.       Caption         =   "Dbl click on picture position or press 'Get Picture' button."
  291.       Height          =   225
  292.       Left            =   1560
  293.       TabIndex        =   14
  294.       Top             =   8355
  295.       Width           =   4065
  296.    End
  297.    Begin VB.Label Label7 
  298.       BackColor       =   &H00E0E0E0&
  299.       Caption         =   "Preview of Current           Selection"
  300.       Height          =   390
  301.       Left            =   9045
  302.       TabIndex        =   12
  303.       Top             =   6165
  304.       Width           =   1395
  305.    End
  306.    Begin VB.Image Image1 
  307.       Height          =   1155
  308.       Left            =   9030
  309.       Stretch         =   -1  'True
  310.       Top             =   4740
  311.       Visible         =   0   'False
  312.       Width           =   1575
  313.    End
  314. End
  315. Attribute VB_Name = "frmMain"
  316. Attribute VB_GlobalNameSpace = False
  317. Attribute VB_Creatable = False
  318. Attribute VB_PredeclaredId = True
  319. Attribute VB_Exposed = False
  320. '*******************************************************************
  321. '**                              Print and Save
  322. '**                               Version 1.6.0
  323. '**                               By Ken Foster
  324. '**                                 April 6, 2008
  325. '**                     Freeware--- no copyrights claimed
  326. '*******************************************************************
  327.  
  328. '=============================================
  329.  
  330. Option Explicit
  331.  
  332. Public SelPos As Integer     'stores which picturebox has been selected
  333.  
  334. Private Sub Form_Load()
  335.    Shape1(0).BorderColor = vbRed      'make first red rectangle red at start up
  336. End Sub
  337.  
  338. Private Sub cmdAddPix_Click()
  339.    frmEdit.Show
  340.    frmMain.Hide
  341.    frmEdit.cmdResetLeft_Click
  342.    frmEdit.cmdResetMid_Click
  343. End Sub
  344.  
  345. Private Sub cmdExit_Click()
  346.    Unload frmEdit
  347.    Unload frmPrintPre
  348.    Unload Me
  349. End Sub
  350.  
  351. Private Sub cmdSPP_Click()
  352. Dim x As Integer
  353.    For x = 0 To 7
  354.       Shape1(x).Visible = False
  355.    Next x
  356.    frmPrintPre.Show
  357. End Sub
  358.  
  359. Private Sub picDisplay_DblClick(Index As Integer)
  360.    SelPos = Index
  361.    cmdAddPix_Click
  362. End Sub
  363.  
  364. Private Sub picDisplay_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  365. Dim xx As Integer
  366.  
  367.    SelPos = Index
  368.     For xx = 0 To 7                        'highlight selected rectangle in red, all others green
  369.       Shape1(xx).BorderColor = &HC000&
  370.    Next xx
  371.    Shape1(Index).BorderColor = vbRed
  372. End Sub
  373.  
  374. Private Sub Form_Unload(Cancel As Integer)
  375.    Unload frmPrintPre
  376.    Unload frmEdit
  377.    Unload Me
  378. End Sub
  379.