i ned a tested sample code/program that force to display on top of all active windows. i already have sample codes from vbcode.com, pscode.com, a1vbcode.com but all failed to overlap a GAME active window.
i ned a tested sample code/program that force to display on top of all active windows. i already have sample codes from vbcode.com, pscode.com, a1vbcode.com but all failed to overlap a GAME active window.
pangita nalang ug sample gyud sa kanang vb na game... para dili ka malibog... kay basin maka chamba ka na naay always-on-top na ilang gi gamit sa ilang game code...
try lang kuno... i-set ang timer interval = 1Code:Private Sub Timer1_Timer() Me.WindowState = 2 'maximize Me.SetFocus End Sub
thnx bro. hav it work now w/ lots of API... thing is u have to send key stroke to switch focus like alt+tab sendkeys "+%Tab", true.. it work fine..
use
SetWindowPos API
Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal _
hWndInsertAfter As Long, ByVal X As Long, ByVal Y As _
Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags _
As Long) As Long
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const HWND_TOPMOST = -1
' code to show window always on top
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
hope this helps![]()
Similar Threads |
|