
FOREVER!!!!!!

GM писал(а):Прогу на автозагрузке которая делает SetWindowText.
Ramzes писал(а):ТОже вариант, но еще нужно хендл пуска получить пере этим
Option Explicit
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Dim Wnd&
Wnd = FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), ByVal 0&, "BUTTON", vbNullString)
SetWindowText Wnd, "стоп"
ShowWindow Wnd, 0
ShowWindow Wnd, 1
DoEvents
End Sub
Option Explicit
Private Declare Function GetDlgItem Lib "user32.dll" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Dim Wnd&
Wnd = GetDlgItem(FindWindow("Shell_TrayWnd", vbNullString), &H130)
SetWindowText Wnd, "стоп"
ShowWindow Wnd, 0
ShowWindow Wnd, 1
DoEvents
End Sub
Option Explicit
Private Declare Function GetDlgItem Lib "user32.dll" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub Form_Load()
Dim Wnd&
Dim BtnRect As RECT
Wnd = GetDlgItem(FindWindow("Shell_TrayWnd", vbNullString), &H130)
GetWindowRect Wnd, BtnRect
MoveWindow Wnd, 0, 0, BtnRect.Right - BtnRect.Left + 20, BtnRect.Bottom - BtnRect.Top, True
SetWindowText Wnd, "СТОП!!!!!"
ShowWindow Wnd, 0
ShowWindow Wnd, 1
DoEvents
End Sub
Option Explicit
Private Declare Function GetDlgItem Lib "user32.dll" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub Form_Load()
Dim Wnd&
Const wText As String = "Ñòîï!!!"
Dim BtnRect As RECT
Wnd = GetDlgItem(FindWindow("Shell_TrayWnd", vbNullString), &H130)
GetWindowRect Wnd, BtnRect
MoveWindow Wnd, 0, 0, TextWidth(wText) / 16 + 32, BtnRect.Bottom - BtnRect.Top, True
SetWindowText Wnd, wText
ShowWindow Wnd, 0
ShowWindow Wnd, 1
DoEvents
End Sub
Сейчас этот форум просматривают: Yandex-бот и гости: 12