home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form Scale Properties"
- ClientHeight = 5430
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7710
- LinkTopic = "Form1"
- ScaleHeight = 5430
- ScaleWidth = 7710
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "User Coordinates"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 405
- Left = 360
- TabIndex = 15
- Top = 4680
- Width = 2235
- End
- Begin VB.TextBox YMax
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 1800
- TabIndex = 14
- Top = 3990
- Width = 735
- End
- Begin VB.TextBox YMin
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 360
- TabIndex = 13
- Top = 3990
- Width = 735
- End
- Begin VB.TextBox XMax
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 1800
- TabIndex = 12
- Top = 3300
- Width = 735
- End
- Begin VB.TextBox XMin
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 360
- TabIndex = 11
- Top = 3315
- Width = 735
- End
- Begin VB.PictureBox Picture1
- BackColor = &H0000FFFF&
- Height = 4845
- Left = 3000
- ScaleHeight = 239.25
- ScaleMode = 2 'Point
- ScaleWidth = 225.75
- TabIndex = 8
- Top = 405
- Width = 4575
- Begin VB.Label Label8
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- BeginProperty Font
- Name = "Tahoma"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 705
- TabIndex = 22
- Top = 4515
- Width = 3795
- End
- Begin VB.Label Label7
- BackStyle = 0 'Transparent
- BeginProperty Font
- Name = "Tahoma"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 0
- TabIndex = 21
- Top = 0
- Width = 3795
- End
- End
- Begin VB.OptionButton Option8
- Caption = "Centimeter"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 1440
- TabIndex = 7
- Top = 2040
- Width = 1275
- End
- Begin VB.OptionButton Option7
- Caption = "Millimeter"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 210
- TabIndex = 6
- Top = 2040
- Width = 1155
- End
- Begin VB.OptionButton Option6
- Caption = "Inch"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 1440
- TabIndex = 5
- Top = 1560
- Width = 795
- End
- Begin VB.OptionButton Option5
- Caption = "Character"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 210
- TabIndex = 4
- Top = 1560
- Width = 1155
- End
- Begin VB.OptionButton Option4
- Caption = "Pixel"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 1440
- TabIndex = 3
- Top = 1080
- Width = 795
- End
- Begin VB.OptionButton Option3
- Caption = "Point"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 210
- TabIndex = 2
- Top = 1080
- Width = 795
- End
- Begin VB.OptionButton Option2
- Caption = "Twip"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 1440
- TabIndex = 1
- Top = 600
- Width = 795
- End
- Begin VB.OptionButton Option1
- Caption = "User"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 210
- TabIndex = 0
- Top = 645
- Width = 795
- End
- Begin VB.Frame Frame1
- Height = 2535
- Left = 120
- TabIndex = 16
- Top = 2760
- Width = 2655
- Begin VB.Label Label3
- Caption = "XMin"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 240
- TabIndex = 20
- Top = 240
- Width = 690
- End
- Begin VB.Label Label4
- Caption = "XMax"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 1680
- TabIndex = 19
- Top = 240
- Width = 720
- End
- Begin VB.Label Label5
- Caption = "YMin"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 240
- TabIndex = 18
- Top = 960
- Width = 690
- End
- Begin VB.Label Label6
- Caption = "YMax"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 1680
- TabIndex = 17
- Top = 945
- Width = 720
- End
- End
- Begin VB.Frame Frame2
- Height = 2175
- Left = 120
- TabIndex = 23
- Top = 360
- Width = 2655
- End
- Begin VB.Label Label2
- Caption = "Y"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 11.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 4920
- TabIndex = 10
- Top = 120
- Width = 1650
- End
- Begin VB.Label Label1
- Caption = "X"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 11.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 3000
- TabIndex = 9
- Top = 105
- Width = 1635
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim currX, currY As Single
- Sub ShowSize()
- Label7.Caption = "(" & Picture1.ScaleLeft & ", " & Picture1.ScaleTop & ")"
- Label8.Caption = "(" & Picture1.ScaleLeft + Picture1.ScaleWidth & ", " & Picture1.ScaleTop + Picture1.ScaleHeight & ")"
- End Sub
- Private Sub Command1_Click()
- If (Val(XMin.Text) = Val(XMax.Text)) Or (Val(YMin.Text) = Val(YMax.Text)) Then
- MsgBox "Invalid user coordinate values"
- Exit Sub
- End If
-
- Picture1.Scale (Val(XMin.Text), Val(YMin.Text))-(Val(XMax.Text), Val(YMax.Text))
- Option1.Value = True
- ShowSize
- End Sub
- Private Sub Option1_Click()
- Picture1.ScaleMode = 0
- ShowSize
- End Sub
- Private Sub Option2_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 1
- ShowSize
- End Sub
- Private Sub Option3_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 2
- ShowSize
- End Sub
- Private Sub Option4_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 3
- ShowSize
- End Sub
- Private Sub Option5_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 4
- ShowSize
- End Sub
- Private Sub Option6_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 5
- ShowSize
- End Sub
- Private Sub Option7_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 6
- ShowSize
- End Sub
- Private Sub Option8_Click()
- Label1.Caption = "X " & Format$(Picture1.ScaleX(currX, Picture1.ScaleMode, 1), "#.000")
- Label2.Caption = "Y " & Format$(Picture1.ScaleY(currY, Picture1.ScaleMode, 1), "#.000")
- Picture1.ScaleMode = 7
- ShowSize
- End Sub
- Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Button <> 1 Then Exit Sub
- Picture1.Refresh
- Picture1.Line (X, Picture1.ScaleTop)-(X, Picture1.ScaleTop + Picture1.ScaleHeight)
- Picture1.Line (Picture1.ScaleLeft, Y)-(Picture1.ScaleLeft + Picture1.ScaleWidth, Y)
- Label1.Caption = "X " & Format$(X, "#.000")
- Label2.Caption = "Y " & Format$(Y, "#.000")
- currX = X
- currY = Y
- End Sub
-