Private Declare Function LockWindowUpdate Lib "user32.dll" (ByVal hwndLock As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32.dll" () As Long
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Const WM_PAINT As Long = &HF&
Private Const WM_SYSCOMMAND As Long = &H112
Private Const SC_MINIMIZE As Long = &HF020&
Private Sub Command1_Click()
SendMessage FindWindow("IEFrame", vbNullString), WM_SYSCOMMAND, SC_MINIMIZE, 0 'До скрипта удостоверимся что юзер нифига не видит
LockWindowUpdate GetDesktopWindow
SendMessage FindWindow("IEFrame", vbNullString), WM_SYSCOMMAND, &HF120, 0 'Это восстановление окна до первоначальных размеров. Как видишь юзеру нифиииииииииииииииига не видно
'А туточки код запуска скрипта :)
SendMessage FindWindow("IEFrame", vbNullString), WM_SYSCOMMAND, SC_MINIMIZE, 0 'А теперь после скрипта
ReleaseCapture 'На всякий случ
SetForegroundWindow Me.hwnd 'На всякий случ
End Sub
Сейчас этот форум просматривают: Google-бот и гости: 176