VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



With the help of this code you could not click the other object.

by M.Faisal Farooq (1 Submission)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 25th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

With the help of this code you could not click the other object.

API Declarations


'Block The Curser to move the other Object




Option Explicit

Private Declare Sub ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINT)
Private Declare Sub ClipCursor Lib "user32" (lpRect As Any)
Private Declare Sub OffsetRect Lib "user32" (lpRect As RECT, ByVal X As Long, ByVal Y As Long)
Private Declare Sub GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT)
Private Type RECT
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type
Private Type POINT
X As Long
Y As Long
End Type

Rate With the help of this code you could not click the other object.



If Text1.Text = "faisal" Then
ClipCursor ByVal 0&
End
Else
Label3.Caption = "&Invalid Password"
End If
End Sub

Private Sub Form_Load()
On Error GoTo errhandler
Dim Client As RECT
Dim Up As POINT
ClientToScreen Frame1.hwnd, Up
GetClientRect Frame1.hwnd, Client
OffsetRect Client, Up.X, Up.Y
Up.X = Client.Left
Up.Y = Client.Top
ClipCursor Client
errhandler:
Print Err.Number, Err.Description, "Sorry"
End Sub

Private Sub Timer1_Timer()
Dim i
Dim col
For i = 0 To 23
col = RGB(225 * Rnd + i, 225 * Rnd + i, Rnd * 225 + i)
Label2.ForeColor = col
Next
Timer1.Enabled = True
End Sub

Download this snippet    Add to My Saved Code

With the help of this code you could not click the other object. Comments

No comments have been posted about With the help of this code you could not click the other object.. Why not be the first to post a comment about With the help of this code you could not click the other object..

Post your comment

Subject:
Message:
0/1000 characters