Option Explicit
Dim GetPos As POINTAPI
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim MouseDown As Boolean
Dim FormX As Single
Dim FormY As Single
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Sub cmdConnect_Click()
On Error Resume Next
Dim i As Integer
Form1.WindowState = 1
Do While i <= Text1
SendKeys ("/nudge")
SendKeys "{enter}"
i = i + 1
Sleep (0.3)
If i = Text1 Then
WindowState = 0
End If
Loop
End Sub
Private Sub Timer1_Timer()
Me.Caption = ""
Timer2.Enabled = True
End Sub
Private Sub Timer2_Timer()
Me.Caption = " <--- T h e T r i l l e r s ---->"
End Sub
Private Sub Sleep(Seconds As Double)
Dim TempTime As Double
On Error Resume Next
TempTime = Timer
Do While Timer - TempTime < Seconds
DoEvents
If Timer < TempTime Then
TempTime = TempTime - 24# * 3600#
End If
Loop
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
RELOAD
End Sub
Private Sub imgStop_Click(Index As Integer)
End
End Sub
Private Sub imgStop_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If imgStop(1).Visible = False Then
RELOAD
End If
imgStop(1).Visible = True
End Sub
Private Sub picbar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = True
FormX = X
FormY = Y
End Sub
Private Sub picbar_mouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = 0
End Sub
Private Sub lbltitle_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
RELOAD
Call GetCursorPos(GetPos)
If MouseDown = True Then
Me.Top = (GetPos.Y * 15) - FormY
Me.Left = (GetPos.X * 15) - FormX
End If
End Sub
Private Sub lbltitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = True
FormX = X
FormY = Y
End Sub
Private Sub lbltitle_mouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = False
End Sub
Private Sub picbar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
RELOAD
Call GetCursorPos(GetPos)
If MouseDown = True Then
Me.Top = (GetPos.Y * 15) - FormY
Me.Left = (GetPos.X * 15) - FormX
End If
End Sub
Sub RELOAD()
imgStop(1).Visible = False
picMin(1).Visible = False
picExit(1).Visible = False
End Sub
Private Sub picExit_Click(Index As Integer)
End
End Sub
Private Sub picExit_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If picExit(1).Visible = False Then
RELOAD
End If
picExit(1).Visible = True
End Sub
Private Sub picMin_Click(Index As Integer)
Me.WindowState = vbMinimized
End Sub
Private Sub picMin_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If picMin(1).Visible = False Then
RELOAD
End If
picMin(1).Visible = True
End Sub