سلام
اگر در تالار جستجو میکردید حتما نتایج مفیدی را میابید
از دستور زیر استفاده میشود که شامل دو تابع یکی برای OnTop شدن و دیگری برای بازگردانی به حالت اول
Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd&, ByVal hWndInsertAfter&,ByVal x&, ByVal y&, ByVal Wid&,ByVal Hgt&, ByVal Flags&)
Const SWP_NOSIZE = 1
Const SWP_NOMOVE = 2
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
'Always on top
Private Sub OnTop()
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOSIZE Or SWP_NOMOVE
End Sub
'Notalways on top
Private Sub NotOnTop()
SetWindowPos hwnd, HWND_NOTOPMOST , 0, 0, 0, 0, _
SWP_NOSIZE Or SWP_NOMOVE
End Sub
موفق باشید