VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

VB6 always on top problems with fullscreen Rate Topic: -----

#1 TyVeryMuch  Icon User is offline

  • New D.I.C Head
  • Icon

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 24-March 07


Dream Kudos: 50

Share |

VB6 always on top problems with fullscreen

Post icon  Posted 09 January 2008 - 11:40 AM

I am trying to make a tool for a fullscreen game, but im having problems with making it always on top, it does work, but just not in fullscreen, this is what i got:

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

SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, &H1 Or &H2



Ive tried searching google and many more sites but i couldnt find a solution, hope someone here can help me further

This post has been edited by TyVeryMuch: 09 January 2008 - 11:41 AM

Was This Post Helpful? 0
  • +
  • -


#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • Icon

Reputation: 137
  • View blog
  • Posts: 4,622
  • Joined: 26-November 04


Dream Kudos: 2825

Expert In: J2ME, 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

Re: VB6 always on top problems with fullscreen

Posted 09 January 2008 - 11:03 PM

Add these lines to your code:
Me.Height = Screen.Height
Me.Width = Screen.Width
Me.Left = 0
Me.Top = 0

The form should take up the entire space on the Screen.
Was This Post Helpful? 0
  • +
  • -

#3 TyVeryMuch  Icon User is offline

  • New D.I.C Head
  • Icon

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 24-March 07


Dream Kudos: 50

Re: VB6 always on top problems with fullscreen

Posted 10 January 2008 - 06:44 AM

View Postborn2c0de, on 10 Jan, 2008 - 12:03 AM, said:

Add these lines to your code:
Me.Height = Screen.Height
Me.Width = Screen.Width
Me.Left = 0
Me.Top = 0

The form should take up the entire space on the Screen.


I think you do not fully understand what im trying to make. I want the tool im making in VB to be shown in a fullscreen game and i still want to be able to play the game while my tool is visible
Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • Icon

Reputation: 137
  • View blog
  • Posts: 4,622
  • Joined: 26-November 04


Dream Kudos: 2825

Expert In: J2ME, 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

Re: VB6 always on top problems with fullscreen

Posted 11 January 2008 - 11:07 AM

In that case, you'll need to hook into the Game's Window Handle and post Messages to it.

Depending on whether the game uses OpenGL or DirectX, you'll need the respective API for more information.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users