VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A RUNNING COMMAND BUTTON

by Saeed J.Ghanim (5 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 1st March 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A RUNNING COMMAND BUTTON

API Declarations


AND NAME THE LABLE "lblcounter" AND NAME THE TIMER "timer1"
NAME THE 1ST COMMAND BUTTON "COMMAND1" AND THE 2ND ONE NAME IT "CMD2"

'DECLARE:
NONE

Rate A RUNNING COMMAND BUTTON





Private Sub cmd2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cmd2.Left = Y * 2 + 900
Me.cmd2.Top = X * 2 + 900
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Command1.Left = Y + 500
Me.Command1.Top = X + 500

End Sub



Private Sub form_load()
App.TaskVisible = False
StartLogging = True
End Sub

Private Sub lblcounter_change()
Select Case Val(Me.lblcounter.Caption)
Case Is = 50
Me.MousePointer = 3
Case Is = 100
Me.MousePointer = 12
Case Is = 150
Me.MousePointer = 15

Case Is = 200
MsgBox "Do You Think Iam Crazy That I Will Let You Click Me"
Me.MousePointer = 1
Case Is = 250
MsgBox "HA Ha Ha,I Know It,You Can Not Do It"

Case Is = 300
MsgBox "You Are Crazy,Click On The X To Exit"
Case Is = 301
Me.cmd2.Visible = True
Case Is = 350
MsgBox "You Are Surrounded"

Case Is = 450
MsgBox "ShutDown Your Pc To Close The Game"


End Select


End Sub






Private Sub Timer1_Timer()
Me.lblcounter.Caption = Val(Me.lblcounter.Caption) + 1

End Sub

Private Sub form_change()
lblcounter_change


End Sub









Download this snippet    Add to My Saved Code

A RUNNING COMMAND BUTTON Comments

No comments have been posted about A RUNNING COMMAND BUTTON. Why not be the first to post a comment about A RUNNING COMMAND BUTTON.

Post your comment

Subject:
Message:
0/1000 characters