home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Screen_Cal2042371132007.psc / frmBot.frm < prev    next >
Text File  |  2007-01-13  |  9KB  |  314 lines

  1. VERSION 5.00
  2. Begin VB.Form frmBot 
  3.    BorderStyle     =   0  'None
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   1185
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   1545
  9.    Icon            =   "frmBot.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    Picture         =   "frmBot.frx":00EA
  12.    ScaleHeight     =   1185
  13.    ScaleWidth      =   1545
  14.    ShowInTaskbar   =   0   'False
  15.    Visible         =   0   'False
  16.    Begin VB.CommandButton cmdColor 
  17.       Caption         =   "C"
  18.       BeginProperty Font 
  19.          Name            =   "Arial"
  20.          Size            =   8.25
  21.          Charset         =   0
  22.          Weight          =   400
  23.          Underline       =   0   'False
  24.          Italic          =   0   'False
  25.          Strikethrough   =   0   'False
  26.       EndProperty
  27.       Height          =   210
  28.       Left            =   810
  29.       TabIndex        =   7
  30.       Top             =   720
  31.       Width           =   225
  32.    End
  33.    Begin VB.CommandButton cmdVBDown 
  34.       Caption         =   "6"
  35.       BeginProperty Font 
  36.          Name            =   "Marlett"
  37.          Size            =   8.25
  38.          Charset         =   2
  39.          Weight          =   500
  40.          Underline       =   0   'False
  41.          Italic          =   0   'False
  42.          Strikethrough   =   0   'False
  43.       EndProperty
  44.       Height          =   195
  45.       Left            =   825
  46.       TabIndex        =   6
  47.       Top             =   960
  48.       Width           =   180
  49.    End
  50.    Begin VB.CommandButton cmdVBUp 
  51.       Caption         =   "5"
  52.       BeginProperty Font 
  53.          Name            =   "Marlett"
  54.          Size            =   8.25
  55.          Charset         =   2
  56.          Weight          =   500
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   195
  62.       Left            =   585
  63.       TabIndex        =   5
  64.       Top             =   960
  65.       Width           =   180
  66.    End
  67.    Begin VB.CommandButton cmdVTUp 
  68.       Caption         =   "5"
  69.       BeginProperty Font 
  70.          Name            =   "Marlett"
  71.          Size            =   8.25
  72.          Charset         =   2
  73.          Weight          =   500
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       Height          =   210
  79.       Left            =   615
  80.       TabIndex        =   4
  81.       Top             =   15
  82.       Width           =   180
  83.    End
  84.    Begin VB.CommandButton cmdVTDown 
  85.       Caption         =   "6"
  86.       BeginProperty Font 
  87.          Name            =   "Marlett"
  88.          Size            =   8.25
  89.          Charset         =   2
  90.          Weight          =   500
  91.          Underline       =   0   'False
  92.          Italic          =   0   'False
  93.          Strikethrough   =   0   'False
  94.       EndProperty
  95.       Height          =   210
  96.       Left            =   825
  97.       TabIndex        =   3
  98.       Top             =   15
  99.       Width           =   180
  100.    End
  101.    Begin VB.CommandButton cmdExit 
  102.       BackColor       =   &H008080FF&
  103.       Caption         =   "X"
  104.       BeginProperty Font 
  105.          Name            =   "Arial"
  106.          Size            =   8.25
  107.          Charset         =   0
  108.          Weight          =   400
  109.          Underline       =   0   'False
  110.          Italic          =   0   'False
  111.          Strikethrough   =   0   'False
  112.       EndProperty
  113.       Height          =   255
  114.       Left            =   570
  115.       Style           =   1  'Graphical
  116.       TabIndex        =   2
  117.       Top             =   450
  118.       Width           =   225
  119.    End
  120.    Begin VB.CommandButton cmdRot 
  121.       BackColor       =   &H00FF8080&
  122.       Caption         =   "4"
  123.       BeginProperty Font 
  124.          Name            =   "Marlett"
  125.          Size            =   8.25
  126.          Charset         =   2
  127.          Weight          =   500
  128.          Underline       =   0   'False
  129.          Italic          =   0   'False
  130.          Strikethrough   =   0   'False
  131.       EndProperty
  132.       Height          =   255
  133.       Left            =   795
  134.       Style           =   1  'Graphical
  135.       TabIndex        =   0
  136.       Top             =   450
  137.       Width           =   225
  138.    End
  139.    Begin VB.CommandButton Command1 
  140.       Caption         =   "P"
  141.       BeginProperty Font 
  142.          Name            =   "Arial"
  143.          Size            =   8.25
  144.          Charset         =   0
  145.          Weight          =   400
  146.          Underline       =   0   'False
  147.          Italic          =   0   'False
  148.          Strikethrough   =   0   'False
  149.       EndProperty
  150.       Height          =   210
  151.       Left            =   570
  152.       TabIndex        =   1
  153.       Top             =   720
  154.       Width           =   225
  155.    End
  156.    Begin VB.Line Line2 
  157.       BorderColor     =   &H00000000&
  158.       X1              =   585
  159.       X2              =   -15
  160.       Y1              =   225
  161.       Y2              =   225
  162.    End
  163.    Begin VB.Line Line1 
  164.       BorderColor     =   &H00000000&
  165.       X1              =   1020
  166.       X2              =   1500
  167.       Y1              =   210
  168.       Y2              =   210
  169.    End
  170. End
  171. Attribute VB_Name = "frmBot"
  172. Attribute VB_GlobalNameSpace = False
  173. Attribute VB_Creatable = False
  174. Attribute VB_PredeclaredId = True
  175. Attribute VB_Exposed = False
  176. '*******************************************************************
  177. '**                              Screen Calipers
  178. '**                               Version 4.4.0
  179. '**                               By Ken Foster
  180. '**                               January  2007
  181. '**                     Freeware--- no copyrights claimed
  182. '*******************************************************************
  183.  
  184. '=============================================
  185. Option Explicit
  186.  
  187. Dim OldY As Integer
  188. Dim value As Long
  189.  
  190. Private Sub Form_Load()
  191.     MakeTransparent Me
  192.     FormOnTop Me
  193. End Sub
  194.  
  195. Private Sub Form_Activate()
  196.     cValue
  197. End Sub
  198.  
  199. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  200.     OldY = Y
  201. End Sub
  202.  
  203. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  204.     If Button = 1 Then
  205.         frmBot.Top = frmBot.Top + (Y - OldY)
  206.         frmBot.Left = frmTop.Left + 74
  207.         If frmBot.Top < frmTop.Top + 74 Then
  208.             LockWindowUpdate frmBot.hwnd
  209.             frmBot.Top = frmTop.Top + 74
  210.             LockWindowUpdate 0&
  211.         End If
  212.         If frmBot.Top < frmMid.Top Then
  213.             frmMid.Height = 20
  214.             Exit Sub
  215.         End If
  216.         frmMid.Height = frmBot.Top - (frmTop.Top + frmTop.Height)
  217.     End If
  218. End Sub
  219.  
  220. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  221.    'just to make sure cals are still on top
  222.     FormOnTop frmTop
  223.     FormOnTop frmMid
  224.     FormOnTop Me
  225.     cValue
  226. End Sub
  227.  
  228. Private Sub Command1_Click()
  229.    Smode = Not Smode
  230.    cValue                   'update display
  231.    cmdRot.SetFocus
  232. End Sub
  233.  
  234. Private Sub cmdColor_Click()
  235.    frmColor.Top = frmBot.Top + frmBot.Height
  236.    frmColor.Left = frmBot.Left + frmBot.Width
  237.    frmColor.Visible = Not frmColor.Visible
  238.    cmdRot.SetFocus
  239. End Sub
  240.  
  241. Private Sub cmdVBDown_Click()
  242.     frmBot.Top = frmBot.Top + 15
  243.     cValue
  244.     If frmBot.Top < frmTop.Top + frmTop.Height Then Exit Sub  'no need to draw center bar so exit
  245.     frmMid.Height = frmBot.Top - (frmTop.Top + frmTop.Height)
  246. End Sub
  247.  
  248. Private Sub cmdVBUp_Click()
  249.     frmBot.Top = frmBot.Top - 15
  250.     If frmBot.Top <= frmTop.Top + 74 Then  'if less than home position exit
  251.        frmBot.Top = frmTop.Top + 74
  252.        cValue
  253.     Exit Sub
  254. Else
  255.     If frmBot.Top <= frmTop.Top + frmTop.Height Then GoTo here
  256.     frmMid.Height = frmBot.Top - (frmTop.Top + frmTop.Height)
  257. here:
  258.     cValue                      'update display
  259. End If
  260. End Sub
  261.  
  262. Private Sub cmdVTDown_Click()
  263.     frmTop.Top = frmTop.Top + 15    '15 twips = 1 pixel
  264.     frmMid.Top = frmMid.Top + 15
  265.     frmBot.Top = frmBot.Top + 15
  266. End Sub
  267.  
  268. Private Sub cmdVTUp_Click()
  269.     frmTop.Top = frmTop.Top - 15    '15 twips = 1 pixel
  270.     frmMid.Top = frmMid.Top - 15
  271.     frmBot.Top = frmBot.Top - 15
  272. End Sub
  273.  
  274. Private Sub cmdRot_Click()
  275.     frmTop.Visible = False
  276.     frmMid.Visible = False
  277.     frmBot.Visible = False
  278.     frmLeft.Visible = True
  279.     frmCenter.Visible = True
  280.     frmRight.Visible = True
  281.     frmColor.Visible = False
  282. End Sub
  283.  
  284. Private Sub cmdExit_Click()
  285.     Unload frmCenter
  286.     Unload frmMid
  287.     Unload frmLeft
  288.     Unload frmTop
  289.     Unload frmRight
  290.     Unload frmColor
  291.     Unload frmMain
  292.     Unload Me
  293. End Sub
  294.  
  295. Public Sub cValue()
  296.     If Smode = False Then
  297.         value = ((frmBot.Top - (Int(frmTop.Top + 74))) \ 15)   '15 twips = 1 pixel
  298.         Command1.Caption = "P"
  299.         frmBot.Cls
  300.         frmBot.ForeColor = vbWhite
  301.         frmBot.CurrentX = 580
  302.         frmBot.CurrentY = 230
  303.         frmBot.Print value                   'update display
  304.     Else
  305.         value = (frmBot.Top - (Int(frmTop.Top + 74)))
  306.         Command1.Caption = "T"
  307.         frmBot.Cls
  308.         frmBot.ForeColor = vbWhite
  309.         frmBot.CurrentX = 480
  310.         frmBot.CurrentY = 230
  311.         frmBot.Print value                   'update display
  312.     End If
  313. End Sub
  314.