Results 1 to 4 of 4
  1. #1
    blipi's Avatar
    Join Date
    Jun 2007
    Gender
    male
    Posts
    88
    Reputation
    10
    Thanks
    25
    My Mood
    Amused

    [Tutorial] Make Window Always On top

    As the tittle says i will explain how to make the window allways on top.

    Put that in a module
    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
    Now in ur Form declarations
    Private Const HWND_BOTTOM = 1
    Private Const HWND_NOTOPMOST = -2
    Private Const HWND_TOP = 0
    Private Const HWND_TOPMOST = -1
    Private Const SWP_NOMOVE = &H2
    Private Const SWP_NOSIZE = &H1

    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
    Now Put that 2 functions:
    Public Sub MakeWindowAlwaysTop(hWnd As Long)
    SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, _
    SWP_NOMOVE + SWP_NOSIZE
    Form1.Visible = True
    End Sub

    Public Sub MakeWindowNotTop(hWnd As Long)
    SetWindowPos hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, _
    SWP_NOMOVE + SWP_NOSIZE
    Form1.Visible = False
    End Sub
    And finally if u want to make it on top/or not:
    MakeWindowAlwaysTop (hWnd) 'TO MAKE IT ON TOP
    MakeWindowNotTop (hWnd) 'NOT ON TOP
    Or with HOTKEYS:
    Private Sub Timer1_Timer()
    If GetAsyncKeyState(vbKeyQ) <> 0 Then 'OR UR KEY
    MakeWindowAlwaysTop (hWnd)
    form1.visible=true
    ElseIf GetAsyncKeyState(vbKeyW) <> 0 Then 'OR UR KEY
    MakeWindowNotTop (hWnd)
    Form1.visible=false
    End If
    End Sub
    Last edited by blipi; 11-05-2007 at 12:34 PM.

  2. The Following 6 Users Say Thank You to blipi For This Useful Post:

    condor01 (11-05-2007),icuigorz (11-05-2007),Jumpshot (11-05-2007),SATANICAT (11-05-2007),wilson945766 (12-17-2011),___x][GooD. (12-08-2010)

  3. #2
    icuigorz's Avatar
    Join Date
    Oct 2007
    Location
    Seattle
    Posts
    320
    Reputation
    9
    Thanks
    641
    can you make a hot key for it?
    for example

    press Insert to bring the hack to the front
    press delete to minimize it.

  4. #3
    blipi's Avatar
    Join Date
    Jun 2007
    Gender
    male
    Posts
    88
    Reputation
    10
    Thanks
    25
    My Mood
    Amused
    Quote Originally Posted by icuigorz View Post
    can you make a hot key for it?
    for example

    press Insert to bring the hack to the front
    press delete to minimize it.
    EDIT: NOW IT IS DONE; ON BOTTOM OF THE TUT.
    Last edited by blipi; 11-05-2007 at 02:51 PM.

  5. The Following User Says Thank You to blipi For This Useful Post:

    icuigorz (11-05-2007)

  6. #4
    SATANICAT's Avatar
    Join Date
    Jun 2006
    Gender
    male
    Location
    In a pineapple under the sea. JAJA.
    Posts
    1,364
    Reputation
    18
    Thanks
    209
    My Mood
    Aggressive
    I've been looking for something like this!

    [IMG]https://i12.photobucke*****m/albums/a219/cowfurmoo/SATNICAT.jpg[/IMG]
    www.SATANICA*****m
    Can't you tell I made it in paint?
    [IMG]https://i12.photobucke*****m/albums/a219/cowfurmoo/631184778462.png[/IMG]
    ^If you want to join the SATANICAT union add this to your signature. ^


    Take the Magic: The Gathering 'What Color Are You?' Quiz.
    Support me https://www.SATANICA*****m

Similar Threads

  1. Replies: 28
    Last Post: 03-02-2009, 07:44 AM
  2. Video tutorial: Making WarRock hack in Visual Basic
    By Darky in forum Visual Basic Programming
    Replies: 5
    Last Post: 02-12-2009, 02:47 PM
  3. [Tutorial] Make a Splash Screen
    By Kung Fu Penguin31 in forum Visual Basic Programming
    Replies: 4
    Last Post: 11-11-2007, 05:03 AM
  4. [Help] How to make a form always on top.
    By wr194t in forum Visual Basic Programming
    Replies: 6
    Last Post: 10-23-2007, 07:41 AM
  5. [Video tutorial] Make your own css cheats
    By seren1ty in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 6
    Last Post: 09-15-2007, 04:11 PM