Version 5.00
Begin Vb.form Form1
CAPTION = "Form1"
ClientHeight = 3195
ClientLeft = 60
Clienttop = 345
ClientWidth = 4680
Linktopic = "Form1"
Scaleheight = 3195
Scalewidth = 4680
StartupPosition = 3 'window is default
Begin vb.textbox text2
HEIGHT = 495
LEFT = 1920
TabINDEX = 1
Text = "text2"
TOP = 600
Width = 1455
End
Begin Vb.TextBox Text1
HEIGHT = 495
LEFT = 120
TabINDEX = 0
Text = "text1"
TOP = 600
Width = 1695
End
Begin vb.label label1
Backcolor = & H00FF8080 & H00FF8080 & H00FF8080 &
CAPTION = "label1"
HEIGHT = 495
LEFT = 1800
TabINDEX = 2
TOP = 600
Width = 100
End
End
Attribute VB_Name = "Form1"
Attribute vb_globalnamespace = false
Attribute vb_creatable = false
Attribute VB_PredecLaredId = TRUE
Attribute VB_EXPOSED = FALSE
DIM oldx as in integer
Sub SetLabelpos (L AS Integer, R AS Integer)
If Label1.left Label1.Left = me.text1.left L Else Label1.Left = me.text2.left me.text2.width - r END IF End Sub Private Sub Label1_MouseDown (Button As Integer, Shift As Integer, x as single, y as single) Oldx = X SetLabelpos 200, 300 End Sub Private Sub Label1_Mousemove (Button As Integer, Shift As Integer, x as single, y as single) DIM I If Button = 1 THEN Label1.move X - Oldx Label1.Leftif (label1.left> = me.text1.left 200 and label1.left <= me.text2.left me.text2.width - 300) THEN i = me.text1.width Me.Text1.width = label1.left - me.text1.left Me.Text2.width = me.text2.width (i - me.text1.width) Me.Text2.Left = label1.Left 100 Else SetLabelpos 189, 280 END IF END IF End Sub Private sub label1_mouseup (Button as Integer, Shift as integer, x as single, y as single) Label1.Left = me.text2.left - 100 End Sub