Results 1 to 21 of 21

Thread: Program over-top of fullscreen

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Program over-top of fullscreen

    Is there a way I can have a form show up over top of a full-screen game or something, without disrupting the game, but so there's like a pop-up, so that when I receive an IM in the background or something, it has a pop-up that doesn't interupt my game. Is there a way I can do this?
    Did you find a post in this thread useful? Please click Rate This Post.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Program over-top of fullscreen

    You should ask Jacob Roman since he should know how to do that with DirectX.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Program over-top of fullscreen

    Does setting it to always on top (HWND_TOPMOST) using SetWindowPos() not work?

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Program over-top of fullscreen

    Set the border style of a form to None and then when you maximize it it will go over everything (even the taskbar). Then you can combine it with Always on Top to make it stay over everything. You can also implement the blocking of opening the start menu, task swtiching and so on to create a full game effect.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Program over-top of fullscreen

    Baja he wants a popup over a game

  6. #6
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Program over-top of fullscreen

    Oh... my bad. I thought he wanted to MAKE a game.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    I don't know if anybody has heard of it before, but there is a program called "Xfire" www.xfire.com, anyways it has in game instant messaging, so it shows a popup and what person said it, and when you press a hotkey, it brings up an instant message thing overtop of your game, but anyways the popup is what I want to do, and make it so that you can see it overtop of the game, yet still be playing the game, and when you press a hotkey (I know how to do this) it brings something up, anyways I've attatched a picture of xfire to show you what I mean.
    Attached Images Attached Images  
    Did you find a post in this thread useful? Please click Rate This Post.

  8. #8
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Program over-top of fullscreen

    So what is your problem exactly? what cant you get to work?

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    Will the always on top method work though? Like MSN's popups used to mess up full screen games, but xfire made it work perfect, so I'm wondering if the always on top will work.
    Did you find a post in this thread useful? Please click Rate This Post.

  10. #10
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Program over-top of fullscreen

    I guess the only way to see is to try. Make a timer, set it to 30 seconds or so, and have it pop up a new window and on load (of that popup) set it Always On Top. Then start the game and the timer.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    Ok, thanks I'll try it and let you know.
    Did you find a post in this thread useful? Please click Rate This Post.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    Ok I tried this code:

    VB Code:
    1. Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
    2.   ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
    3. Private Const HWND_TOPMOST = -1
    4. Private Const HWND_NOTOPMOST = -2
    5. Private Const SWP_NOMOVE = &H2
    6. Private Const SWP_NOSIZE = &H1
    7.  
    8. Private Sub Form_Load()
    9. Form1.Visible = False
    10. End Sub
    11.  
    12. Private Sub Timer1_Timer()
    13. Form1.Visible = True
    14. Call SetWindowPos(Form1.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
    15. End Sub

    And it showed up over other windows, but not the full screen game.
    Did you find a post in this thread useful? Please click Rate This Post.

  13. #13
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Program over-top of fullscreen

    Did it at least flash for a moment?

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    I didn't see anything until I alt-tabbed out of the game, but it was overtop of other windows.
    Did you find a post in this thread useful? Please click Rate This Post.

  15. #15
    Member
    Join Date
    Nov 2003
    Posts
    46

    Re: Program over-top of fullscreen

    i found this on allapi.net, but it will only print text and it flickers

    you can probably use the same method and BitBlit on to the same hDC as your game
    but i cant think of a way to get your whole form on top ?

    VB Code:
    1. 'This Project needs
    2. '- two timers, interval=100
    3. '- a button
    4.  
    5. 'in general section
    6. Private Type POINTAPI
    7.     x As Long
    8.     y As Long
    9. End Type
    10.  
    11. Private Declare Function GetActiveWindow Lib "user32" () As Long
    12. Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
    13. Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    14.  
    15. Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
    16. Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    17. Private Sub Form_Load()
    18.     Timer1.Interval = 100
    19.     Timer1.Enabled = True
    20.     Timer2.Interval = 100
    21.     Timer2.Enabled = True
    22.     Command1.Caption = "Draw Text"
    23. End Sub
    24. 'This will draw an Ellipse on the active window
    25. Sub Timer1_Timer()
    26.     Dim Position As POINTAPI
    27.     'Get the cursor position
    28.     GetCursorPos Position
    29.     'Draw the Ellipse on the Screen's DC
    30.     Ellipse GetWindowDC(0), Position.x - 5, Position.y - 5, Position.x + 5, Position.y + 5
    31. End Sub
    32. Sub Command1_Click()
    33.     'KPD-Team 1998
    34.     'URL: [url]http://www.allapi.net/[/url]
    35.     'E-Mail: [email][email protected][/email]
    36.  
    37.     Dim intCount As Integer, strString As String
    38.     strString = "Cool, text on screen !"
    39.     For intCount = 0 To 30
    40.         'Draw the text on the screen
    41.         TextOut GetWindowDC(0), intCount * 20, intCount * 20, strString, Len(strString)
    42.     Next intCount
    43. End Sub
    44. Private Sub Timer2_Timer()
    45.     'Draw the text to the active window
    46.     TextOut GetWindowDC(GetActiveWindow), 50, 50, "This is a form", 14
    47. End Sub
    48.  
    49. Close this window

  16. #16
    Member
    Join Date
    Nov 2003
    Posts
    46

    Re: Program over-top of fullscreen

    you can also try SetParent

    this puts the whole form inside the game window, BUT it will flicker
    works ok for notepad tho

    VB Code:
    1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    2. Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    3.  
    4.  
    5. Private Sub Form_Load()
    6.     Me.ZOrder 0
    7.     Timer1.Interval = 1000
    8.     Timer2.Interval = 100
    9. End Sub
    10.  
    11. Private Sub Timer1_Timer()
    12. Dim hwnd As Long
    13.  
    14.     hwnd = FindWindow("Notepad", vbNullString)
    15.     If hwnd = 0 Then Exit Sub
    16.  
    17.     SetParent Me.hwnd, hwnd
    18.  
    19.     Timer1.Enabled = False
    20.  
    21. End Sub
    22.  
    23. Private Sub Timer2_Timer()
    24.     Me.Refresh
    25. End Sub

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    Is there anyway to stop the flickering?
    Did you find a post in this thread useful? Please click Rate This Post.

  18. #18
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Program over-top of fullscreen

    Why dont you use spy++ to watch XFire and see what messages it sends

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    I've tried to use spy++ before, I always get confused on how it works, could you explain it to me a bit?
    Did you find a post in this thread useful? Please click Rate This Post.

  20. #20
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Program over-top of fullscreen

    you find the window of XFire messanger with it (by its name). Then you right click on it and click messages

    you will see a whole lot of stuff there, but try and remember the number on the left and quickly start up your game and ask a friend to message you. Then shrink the game and pause spy++ and read along until you see something that might be of interest

  21. #21

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    546

    Re: Program over-top of fullscreen

    I'll try it out some time.
    Did you find a post in this thread useful? Please click Rate This Post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width