VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

The following Code Helps To refresh Desktop using a different approach (This will be Helpful if You

BrijMohan.K  (3 Submissions)   Windows API Call/Explanation   VB 6.0   Unknown Difficulty   Sat 3rd February 2001   Mon 8th February 2021

The following Code Helps To refresh Desktop using a different approach (This will be Helpful if You are trying to Change Wallpaper,Using

API Declarations


x As Long
y As Long
End Type
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Const VK_F5 = &H74
Const KEYEVENTF_KEYUP = &H2
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Dim a As Integer, b As Integer
Dim cname As String
Dim cp As POINTAPI
Dim rval As Long

Rate The following Code Helps To refresh Desktop using a different approach (This will be Helpful if You (1(1 Vote))
The following Code Helps To refresh Desktop using a different approach (This will be Helpful if You.bas

The following Code Helps To refresh Desktop using a different approach (This will be Helpful if You Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters