Sign in to follow this  
Followers 0
FunkyBunnies

Vista themes messing with my formatting!

2 posts in this topic

Heyo all,

I've got a script working pretty nicely in XP using the classic theme, but in vista my formatting is all wonky because aero adds an 8 pixel border to any resizable window. I've tried calling uxtheme.dll and passing it nothing like I would in XP, but I hear it's different in Vista? it doesn't seem to be working. Is there any way to force the classic theme onto my script that works in xp as well as vista?

if not that, then is there a way to get the screenspace position of a control rather than relative to its parent window?

thanks!

Share this post


Link to post
Share on other sites



if not that, then is there a way to get the screenspace position of a control rather than relative to its parent window?

If you by "screenspace position" mean screen coordinates then use WinGetPos(). If not then define "screenspace position".

GUICreate("GUI", 320, 240, 0, 0)
$Button = GUICtrlCreateButton("Button", 10, 10)
$hButton = GUICtrlGetHandle($Button)
GUISetState()
$aPos = WinGetPos($hButton)
MsgBox(0, "Button positions:", "X: " & $aPos[0] & @CRLF & "Y: " & $aPos[1] & @CRLF & "Width: " & $aPos[2] & @CRLF & "Height: " & $aPos[3])

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0