Valhalla Legends Forums Archive | General Discussion | Always On Top.

AuthorMessageTime
LordNevar
I am currently running multiple monitors, and specifically running Diablo II in a window seeming how it cuts down on the chopiness, and game lag while playing it in full mode. I am trying to find out if there's a way to keep Diablo II open at all times on my other screen without it minimizing to the tray. If there's a cmd line shortcut, or if there's a Windows tweak or something that allows you to keep a window on top of all other windows at all times. I have tried to google for my answer but the only thing I get are programs to do it, and none of them seem to work with the Diablo II window, any help would be appreciated.
April 15, 2005, 5:10 PM
UserLoser.
Game.exe has a "-w" command line option to play it in a window.  I don't think it makes it always on top, though, but you could easily write a program (or someone else could), or find a program to set the windows position to always on top
April 15, 2005, 7:04 PM
Zakath
Just write a hack to get a handle to the window and send it a message.
April 16, 2005, 2:26 AM
JoeTheOdd
StealthBot 1.39's Winamp Module seems to have some nice HWnd-getting code. Always works on winamp, anyhow, and a slight modification should get you your Diablo II HWnd.
April 17, 2005, 10:58 PM
laurion
Powermenu, google it.
April 18, 2005, 12:56 AM
R.a.B.B.i.T
[code]Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
    (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
   
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 Sub Form_Load()
    Dim winHandle As Long

    Dim strProcess As String
    strProcess = "Game.exe"  '  replace with w/e you want to on-top-erize

    winHandle = FindWindow(vbNullString, strProcess)
   
    If winHandle = 0 Then
        MsgBox "Could not find window."
        Exit Sub
    End If
   
    Const HWND_TOPMOST = -1
    Const SWP_NOSIZE = 1
    Const SWP_NOMOVE = 2
    Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
   
    SetWindowPos winHandle, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
End Sub[/code]

Works with some things (like Winamp and API-Guide), but not with others (like Diablo II).
April 18, 2005, 1:36 AM

Search