Caption = "Example of 3D routines and splitter bars"
ClientHeight = 4710
ClientLeft = 885
ClientTop = 1515
ClientWidth = 7575
Height = 5115
Left = 825
LinkTopic = "Form1"
ScaleHeight = 4710
ScaleWidth = 7575
Top = 1170
Width = 7695
Begin PictureBox Picture2
Height = 432
Left = 4860
Picture = FORM1.FRX:0000
ScaleHeight = 405
ScaleWidth = 405
TabIndex = 15
Top = 4500
Visible = 0 'False
Width = 432
End
Begin PictureBox PBottom
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 720
Left = 0
ScaleHeight = 720
ScaleWidth = 7575
TabIndex = 10
Top = 3988
Width = 7576
Begin PictureBox PMenu
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 480
Left = 120
ScaleHeight = 480
ScaleWidth = 7320
TabIndex = 11
Top = 120
Width = 7320
Begin CommandButton B_Colors
Caption = "Colors"
Height = 360
Left = 60
TabIndex = 9
Top = 60
Width = 1200
End
Begin CommandButton B_Exit
Caption = "Exit"
Height = 360
Left = 6060
TabIndex = 14
Top = 60
Width = 1200
End
Begin PictureBox PStatus
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 360
Left = 1380
ScaleHeight = 360
ScaleWidth = 4560
TabIndex = 12
Top = 60
Width = 4560
Begin Label Status
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "Help/Status bar"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 0
TabIndex = 13
Top = 60
Width = 4440
End
End
End
End
Begin TextBox RText
BackColor = &H00FFFFFF&
Height = 1800
Left = 3840
MultiLine = -1 'True
TabIndex = 8
Text = "As the mouse pointer enters a control, the status/help bar shows the corresponding help line."
Top = 2040
Width = 3600
End
Begin TextBox LText
BackColor = &H00FFFFFF&
Height = 1800
Left = 120
MultiLine = -1 'True
TabIndex = 7
Text = "The two picture boxes and the two text boxes are resized when you drag one of the five splitters. Please read the comments in 3D2.BAS (declarations section)."
Top = 2040
Width = 3600
End
Begin PictureBox C
BackColor = &H000000FF&
BorderStyle = 0 'None
Height = 96
Left = 3732
MousePointer = 8 'Size NW SE
ScaleHeight = 90
ScaleWidth = 90
TabIndex = 6
Top = 1932
Width = 96
End
Begin PictureBox HR
BackColor = &H0000FF00&
BorderStyle = 0 'None
Height = 96
Left = 3840
MousePointer = 7 'Size N S
ScaleHeight = 90
ScaleWidth = 3615
TabIndex = 5
Top = 1932
Width = 3612
End
Begin PictureBox HL
BackColor = &H0000FF00&
BorderStyle = 0 'None
Height = 96
Left = 108
MousePointer = 7 'Size N S
ScaleHeight = 90
ScaleWidth = 3615
TabIndex = 3
Top = 1932
Width = 3612
End
Begin PictureBox VT
BackColor = &H0000FFFF&
BorderStyle = 0 'None
Height = 1824
Left = 3732
MousePointer = 9 'Size W E
ScaleHeight = 1830
ScaleWidth = 90
TabIndex = 2
Top = 108
Width = 96
End
Begin PictureBox LPict
BackColor = &H00C0C0C0&
Height = 1800
Left = 120
ScaleHeight = 1770
ScaleWidth = 3570
TabIndex = 1
Tag = "List of target language sentences"
Top = 120
Width = 3600
End
Begin PictureBox RPict
BackColor = &H00C0C0C0&
Height = 1800
Left = 3840
ScaleHeight = 1770
ScaleWidth = 3570
TabIndex = 0
Tag = "List of target language sentences"
Top = 120
Width = 3600
End
Begin PictureBox VB
BackColor = &H0000FFFF&
BorderStyle = 0 'None
Height = 1824
Left = 3732
MousePointer = 9 'Size W E
ScaleHeight = 1830
ScaleWidth = 90
TabIndex = 4
Top = 2028
Width = 96
End
Option Explicit
Dim tx As Integer ' TwipsPerPixelX
Dim ty As Integer ' TwipsPerPixelY
Dim MinL As Integer ' Limits to splitters' positions
Dim MaxR As Integer
Dim MinT As Integer
Dim MaxB As Integer
Dim OKtoDraw As Integer ' Flag to indicate the rectangle should be drawn
Dim Vrct As RECT ' Vertical outline structure
Dim Hrct As RECT ' Horizontal outline structure
Dim SplitInitLeft As Integer ' Initial values for MouseMove
Dim InitX As Integer
Dim SplitInitTop As Integer
Dim InitY As Integer
Sub B_Colors_Click ()
If C.BackColor = RED Then
C.BackColor = LIGHTGRAY
HL.BackColor = LIGHTGRAY
HR.BackColor = LIGHTGRAY
VT.BackColor = LIGHTGRAY
VB.BackColor = LIGHTGRAY
Else
C.BackColor = RED
HL.BackColor = GREEN
HR.BackColor = GREEN
VT.BackColor = YELLOW
VB.BackColor = YELLOW
End If
End Sub
Sub B_Colors_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
Status = "B_Colors help"
End Sub
Sub B_Exit_Click ()
Unload Me
End Sub
Sub B_Exit_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
Status = "B_Exit help"
End Sub
Sub C_DblClick ()
' This is to compensate for the extra MouseUp event that
' is triggered when the user doubleclicks on the splitter.
' (The rectangle must be drawn an even number of times.)
DrawOutline Vrct, Me
DrawOutline Hrct, Me
End Sub
Sub C_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)