forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


API: how to set a topmost/foregroundwindow to normal

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
Dave England
Newbie


Joined: 22 Aug 2003
Posts: 3

PostPosted: Sun Oct 05, 2003 3:08 pm    Post subject: API: how to set a topmost/foregroundwindow to normal Reply with quote

Hi Very Happy

I know CodeScript has posted a lot of Api Stuff but i cant
restore a 1024x768 Window (that hides taskbar too)
to normal state. Its topmost or something !

What im want in detail is:
Display my App Window over a Game Window without to
press ALT+TAB and switch back to windows.

But the Game wont let me because its topmost.


Thanks for any help in advance ! Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Oct 20, 2003 5:35 am    Post subject: Reply with quote

Code:
LOADLIB USER32
%H = @strdel(@WINEXISTS(#TFORM),1,1)

if %H
 %H = @lib(user32,SetWindowPos,bool:,%H,-2, 0, 0, 0, 0, 3)
 goto EVLOOPI
else
    ERROR -1
  end
 FREELIB USER32
 end


Try this - Obtain the Name or class name* of your game window using window spy of VDS. immediately after this make your window topmost.
http://forum.vdsworld.com/viewtopic.php?t=1683
Of course your game may be checking if it is topmost window under a timer. If this is the case then there is nothing much that could be done.
Let me know what happens.
*Use @WINATPOINT if the window has notitle and also has a class name shared by other game windows e.g a game contorl panel. You can safely assume that the window at the center of your screen is the game window if it's class name matches with the game window class name.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group