home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.UserControl VB6B
- ClientHeight = 3600
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 4800
- MouseIcon = "VB6B.ctx":0000
- MousePointer = 99 'Custom
- ScaleHeight = 3600
- ScaleWidth = 4800
- ToolboxBitmap = "VB6B.ctx":0152
- Begin VB.Timer Timer2
- Enabled = 0 'False
- Interval = 100
- Left = 3375
- Top = 2475
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 75
- Left = 3960
- Top = 1440
- End
- Begin VB.CommandButton CB
- Appearance = 0 'Flat
- Caption = "VB6Button"
- BeginProperty Font
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Left = 660
- MouseIcon = "VB6B.ctx":0464
- MousePointer = 99 'Custom
- Style = 1 'Graphical
- TabIndex = 0
- TabStop = 0 'False
- Top = 720
- Width = 1395
- End
- End
- Attribute VB_Name = "VB6B"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Public X1, Y1, X2, Y2
- Event Click()
- Event MuoviMouse()
-
- Private Function eDentro() As Boolean
- Dim ptMouse As POINTAPI
-
- GetCursorPos ptMouse
- If (WindowFromPoint(ptMouse.X, ptMouse.Y) = CB.hWnd) Or (WindowFromPoint(ptMouse.X, ptMouse.Y) = UserControl.hWnd) Then
- eDentro = True
- Else
- eDentro = False
- End If
-
- End Function
-
-
-
- Public Property Get Label() As String
- Label = CB.Caption
- End Property
- Public Property Let Label(ByVal NuovaLbl As String)
- CB.Caption = NuovaLbl
- PropertyChanged "Label"
- End Property
-
-
-
- Private Sub CB_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Tempo <> 0 Then Exit Sub
- Timer1.Enabled = True
-
- End Sub
-
- Private Sub CB_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Tempo <> 0 Then
- Exit Sub
- End If
-
- Timer2.Enabled = True
- RaiseEvent MuoviMouse
-
- End Sub
-
-
- Private Sub Timer1_Timer()
- If UserControl.BorderStyle = 0 Then
- UserControl.BorderStyle = 1
- Else
- UserControl.BorderStyle = 0
- End If
- Tempo = Tempo + 1
- If Tempo = 6 Then
- UserControl.BorderStyle = 0
- CB.FontBold = False
- Line (X1, Y1)-(X2, Y2), UserControl.BackColor, B
- Tempo = 0
- Timer1.Enabled = False
- RaiseEvent Click
-
- End If
-
- End Sub
-
- Private Sub Timer2_Timer()
- If eDentro Then
- 'mouse dentro
- If Not CB.FontBold Then CB.FontBold = True
- Line (X1, Y1)-(X2, Y2), QBColor(0), B
- Else
- 'mouse fuori
- CB.FontBold = False
- Line (X1, Y1)-(X2, Y2), UserControl.BackColor, B
- Timer2.Enabled = False
- End If
-
- End Sub
-
- Private Sub UserControl_InitProperties()
- Timer1.Enabled = False
- Timer2.Enabled = False
- Tempo = 0
- End Sub
-
- Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Tempo <> 0 Then Exit Sub
- Timer1.Enabled = True
-
- End Sub
-
- Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Tempo <> 0 Then
- Exit Sub
- End If
-
- Timer2.Enabled = True
- RaiseEvent MuoviMouse
- End Sub
-
- Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
- Label = PropBag.ReadProperty("Label", "")
-
- End Sub
-
- Private Sub UserControl_Resize()
- On Error Resume Next
- UserControl.Picture = UserControl.Extender.Container.Picture
- CB.Picture = UserControl.Extender.Container.Picture
-
- 'UserControl.Height = 400
- UserControl.BackColor = UserControl.Ambient.BackColor
- dx = UserControl.Width
- dy = UserControl.Height
- CB.Left = 1 / 100 * dx
- CB.Top = 2 / 100 * dy
- CB.Width = dx - 2 * CB.Left
- CB.Height = dy - 2 * CB.Top
- X1 = CB.Left / 2
- Y1 = CB.Top / 2
- X2 = CB.Left + CB.Width
- Y2 = CB.Top + CB.Height
-
- End Sub
-
- Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
- PropBag.WriteProperty "Label", Label, ""
- End Sub
-
-