Detecting collision between 2 windows

Recommended Posts

Hi there,

I was wondering how I can check if there's a collision between 2 windows.

Assuming that there isn't a command like "if X overlaps Y" I took the more mathematical approach.

I am not sure if this is a correct though, and I don't know how to translate it to AutoIt.

Here's a picture that hopefully explains what I mean:

Thanks

Edited by nf67

Share on other sites

```#include <array.au3>

Sleep(3000)
\$Win1 = _WinGetByPID(\$Win1);get win handle to app window
\$Win2 = Run("mspaint.exe")
Sleep(3000)
\$Win2 = _WinGetByPID(\$Win2);get win handle to app window

While 1
Sleep(10)
CheckCollission(\$Win1, \$Win2)
WEnd

Func CheckCollission(\$Win1, \$Win2)
#cs
Win 1
\$Win1Pos[0];X start
\$Win1Pos[1];Y start
\$Win2Pos[2];X end
\$Win2Pos[3];Y end

Win 2
\$Win2Pos[0];X start
\$Win2Pos[1];Y start
\$Win2Pos[2];X end
\$Win2Pos[3];Y end
#ce

\$Win1Pos = WinGetPos(\$Win1)
\$Win2Pos = WinGetPos(\$Win2)

\$Win1Pos[2] = \$Win1Pos[0] + \$Win1Pos[2]
\$Win1Pos[3] = \$Win1Pos[1] + \$Win1Pos[3]
\$Win2Pos[2] = \$Win2Pos[0] + \$Win2Pos[2]
\$Win2Pos[3] = \$Win2Pos[1] + \$Win2Pos[3]

_ArrayDisplay(\$Win1Pos)
_ArrayDisplay(\$Win2Pos)

Sleep(5000)
;math to figure out if they are in each others area

EndFunc

Func _WinGetByPID(\$iPID)
Local \$aWList = WinList()
For \$iCC = 1 To \$aWList[0][0]
If WinGetProcess(\$aWList[\$iCC][1]) = \$iPID And _
BitAND(WinGetState(\$aWList[\$iCC][1]), 2) Then
Return \$aWList[\$iCC][0]
EndIf
Next
Return SetError(1, 0, 0)
EndFunc```

Edited by ken82m

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share on other sites

Sorry, I've messed around with it a little bit but I really don't understand what it does and how it does that...

Could you maybe create a little example with a MsgBox that pops up when there is a collision?

With a ball and a wall for example?

```#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;The ball.
\$Ball = GUICreate("Ball", 150, 150, 200, 200)
GUISetBkColor(0x800000)
\$CreateWall = GUICtrlCreateButton("Wall", 0, 32, 49, 17, \$WS_GROUP)
\$BallLabel = GUICtrlCreateLabel("Ball", 8, 8, 21, 17)
GUISetState(@SW_SHOW)

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$CreateWall

;The wall.
\$Wall = GUICreate("Wall", 150, 500, 300, 300)
GUISetBkColor(0x808080)
\$WallLabel = GUICtrlCreateLabel("Wall", 8, 8, 25, 17)
GUISetState(@SW_SHOW)
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd```

I'm pretty confused

Share on other sites

Sorry, I've messed around with it a little bit but I really don't understand what it does and how it does that...

Could you maybe create a little example with a MsgBox that pops up when there is a collision?

With a ball and a wall for example?

```#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;The ball.
\$Ball = GUICreate("Ball", 150, 150, 200, 200)
GUISetBkColor(0x800000)
\$CreateWall = GUICtrlCreateButton("Wall", 0, 32, 49, 17, \$WS_GROUP)
\$BallLabel = GUICtrlCreateLabel("Ball", 8, 8, 21, 17)
GUISetState(@SW_SHOW)

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$CreateWall

;The wall.
\$Wall = GUICreate("Wall", 150, 500, 300, 300)
GUISetBkColor(0x808080)
\$WallLabel = GUICtrlCreateLabel("Wall", 8, 8, 25, 17)
GUISetState(@SW_SHOW)
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd```

I'm pretty confused

Try this which is an extension of ken82m's post.

```#include <array.au3>
Sleep(3000)
\$Win1 = _WinGetByPID(\$Win1);get win handle to app window
\$Win2 = Run("mspaint.exe")
Sleep(2000)
\$Win2 = _WinGetByPID(\$Win2);get win handle to app window
While 1
Sleep(10)
If CheckCollission(\$Win1, \$Win2) Then
ToolTip("collision")
Else
ToolTip("")
EndIf
WEnd
Func CheckCollission(\$Win1, \$Win2)

\$Win1Pos = WinGetPos(\$Win1)
\$Win2Pos = WinGetPos(\$Win2)

If _CheckOverlap(\$Win1Pos, \$Win2Pos) Then Return True
If _CheckOverlap(\$Win2Pos, \$Win1Pos) Then Return True
EndFunc  ;==>CheckCollission
Func _WinGetByPID(\$iPID)
Local \$aWList = WinList()
For \$iCC = 1 To \$aWList[0][0]
If WinGetProcess(\$aWList[\$iCC][1]) = \$iPID And _
BitAND(WinGetState(\$aWList[\$iCC][1]), 2) Then
Return \$aWList[\$iCC][0]
EndIf
Next
Return SetError(1, 0, 0)
EndFunc  ;==>_WinGetByPID
Func _CheckOverlap(\$ar1, \$a2)

If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True

EndFunc  ;==>_CheckOverlap
; Note this_WinAPI_PtInRectEx() Not the same as 1st post.
; Here Width & height used, NOT Bottom right corner position.
; Also, declared \$tagREC.  \$tagRECT required WinAPI.au3 to be included.
; Author - Malkey
Func _WinAPI_PtInRectEx(\$iX, \$iY, \$iLeft, \$iTop, \$iWidth, \$iHeight)
Local \$aResult, \$tagREC = "int Left;int Top;int Right;int Bottom"
Local \$tRect = DllStructCreate(\$tagREC)
DllStructSetData(\$tRect, "Left", \$iLeft)
DllStructSetData(\$tRect, "Top", \$iTop)
DllStructSetData(\$tRect, "Right", \$iLeft + \$iWidth)
DllStructSetData(\$tRect, "Bottom", \$iTop + \$iHeight)
\$aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr(\$tRect), "int", \$iX, "int", \$iY)
Return \$aResult[0] <> 0
EndFunc```

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share on other sites

Thank you, I really didn't feel like figuring out the formula, I never said math was my strongpoint lol

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share on other sites

Here's an example using your code.

Adlib is the best way to monitor since your using a loop within a loop.

```#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;===================================================================
;GUI's should be created before monitoring begins
;===================================================================
;The Wall
\$Wall = GUICreate("Wall", 150, 500, 300, 300)
GUISetBkColor(0x808080)
\$WallLabel = GUICtrlCreateLabel("Wall", 8, 8, 25, 17)

;The ball.
\$Ball = GUICreate("Ball", 150, 150, 200, 200)
GUISetBkColor(0x800000)
\$CreateWall = GUICtrlCreateButton("Wall", 0, 32, 49, 17, \$WS_GROUP)
\$BallLabel = GUICtrlCreateLabel("Ball", 8, 8, 21, 17)
GUISetState(@SW_SHOW)
;===================================================================

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$CreateWall
;The wall.
GUICtrlSetData(\$WallLabel, "Wall"); update label text if you needed to
GUISetState(@SW_SHOW, \$Wall)
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd

;==================================================================================
; FUNCTIONS FOR CHECK COLLISSION
;==================================================================================
Func MonitorWindows()
If BitAND(WinGetState(\$Ball), 2) AND BitAND(WinGetState(\$Wall), 2) AND CheckCollission(\$Ball, \$Wall) Then
ToolTip("collision")
Else
ToolTip("")
EndIf
EndFunc

Func CheckCollission(\$Win1, \$Win2)

\$Win1Pos = WinGetPos(\$Win1)
If @error Then
Return 0
EndIf
\$Win2Pos = WinGetPos(\$Win2)
If @error Then
Return 0
EndIf

If _CheckOverlap(\$Win1Pos, \$Win2Pos) Then Return True
If _CheckOverlap(\$Win2Pos, \$Win1Pos) Then Return True
EndFunc;==>CheckCollission

Func _WinGetByPID(\$iPID)
Local \$aWList = WinList()
For \$iCC = 1 To \$aWList[0][0]
If WinGetProcess(\$aWList[\$iCC][1]) = \$iPID And _
BitAND(WinGetState(\$aWList[\$iCC][1]), 2) Then
Return \$aWList[\$iCC][0]
EndIf
Next
Return SetError(1, 0, 0)
EndFunc;==>_WinGetByPID

Func _CheckOverlap(\$ar1, \$a2)
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
EndFunc;==>_CheckOverlap

; Note this_WinAPI_PtInRectEx() Not the same as 1st post.
; Here Width & height used, NOT Bottom right corner position.
; Also, declared \$tagREC.  \$tagRECT required WinAPI.au3 to be included.
; Author - Malkey
Func _WinAPI_PtInRectEx(\$iX, \$iY, \$iLeft, \$iTop, \$iWidth, \$iHeight)
Local \$aResult, \$tagREC = "int Left;int Top;int Right;int Bottom"
Local \$tRect = DllStructCreate(\$tagREC)
DllStructSetData(\$tRect, "Left", \$iLeft)
DllStructSetData(\$tRect, "Top", \$iTop)
DllStructSetData(\$tRect, "Right", \$iLeft + \$iWidth)
DllStructSetData(\$tRect, "Bottom", \$iTop + \$iHeight)
\$aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr(\$tRect), "int", \$iX, "int", \$iY)
Return \$aResult[0] <> 0
EndFunc```
Edited by ken82m

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share on other sites

just for fun ...

```#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;===================================================================
;GUI's should be created before monitoring begins
;===================================================================
;The Wall
\$Wall = GUICreate("Wall", 150, 500, 300, 300)
GUISetBkColor(0x808080)
\$WallLabel = GUICtrlCreateLabel("Wall", 8, 8, 25, 17)

;The ball.
\$Ball = GUICreate("Ball", 150, 150, 200, 200)
GUISetBkColor(0x800000)
\$CreateWall = GUICtrlCreateButton("Wall", 0, 32, 49, 17, \$WS_GROUP)
\$BallLabel = GUICtrlCreateLabel("Ball", 8, 8, 21, 17)
GUISetState(@SW_SHOW)
;===================================================================

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$CreateWall
;The wall.
GUICtrlSetData(\$WallLabel, "Wall"); update label text if you needed to
GUISetState(@SW_SHOW, \$Wall)
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd

;==================================================================================
; FUNCTIONS FOR CHECK COLLISSION
;==================================================================================
Func MonitorWindows()
If BitAND(WinGetState(\$Ball), 2) And BitAND(WinGetState(\$Wall), 2) And CheckCollission(\$Ball, \$Wall) Then
ToolTip("collision")
\$size = WinGetPos("Ball")
For \$i = 1 To 10
WinMove("Ball", "", \$size[0] + 5, \$size[1] + 5, \$size[2], \$size[3])
;~          sleep(500)
WinMove("Ball", "", \$size[0] - 5, \$size[1] - 5, \$size[2], \$size[3])
Next
Else
ToolTip("")
EndIf
EndFunc  ;==>MonitorWindows

Func CheckCollission(\$Win1, \$Win2)

\$Win1Pos = WinGetPos(\$Win1)
If @error Then
Return 0
EndIf
\$Win2Pos = WinGetPos(\$Win2)
If @error Then
Return 0
EndIf

If _CheckOverlap(\$Win1Pos, \$Win2Pos) Then Return True
If _CheckOverlap(\$Win2Pos, \$Win1Pos) Then Return True
EndFunc  ;==>CheckCollission

Func _WinGetByPID(\$iPID)
Local \$aWList = WinList()
For \$iCC = 1 To \$aWList[0][0]
If WinGetProcess(\$aWList[\$iCC][1]) = \$iPID And _
BitAND(WinGetState(\$aWList[\$iCC][1]), 2) Then
Return \$aWList[\$iCC][0]
EndIf
Next
Return SetError(1, 0, 0)
EndFunc  ;==>_WinGetByPID

Func _CheckOverlap(\$ar1, \$a2)
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
EndFunc  ;==>_CheckOverlap

; Note this_WinAPI_PtInRectEx() Not the same as 1st post.
; Here Width & height used, NOT Bottom right corner position.
; Also, declared \$tagREC.  \$tagRECT required WinAPI.au3 to be included.
; Author - Malkey
Func _WinAPI_PtInRectEx(\$iX, \$iY, \$iLeft, \$iTop, \$iWidth, \$iHeight)
Local \$aResult, \$tagREC = "int Left;int Top;int Right;int Bottom"
Local \$tRect = DllStructCreate(\$tagREC)
DllStructSetData(\$tRect, "Left", \$iLeft)
DllStructSetData(\$tRect, "Top", \$iTop)
DllStructSetData(\$tRect, "Right", \$iLeft + \$iWidth)
DllStructSetData(\$tRect, "Bottom", \$iTop + \$iHeight)
\$aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr(\$tRect), "int", \$iX, "int", \$iY)
Return \$aResult[0] <> 0
EndFunc  ;==>_WinAPI_PtInRectEx```

Share on other sites

Might as well make it a "Ball" lol

```#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

;===================================================================
;GUI's should be created before monitoring begins
;===================================================================
;The Wall
\$Wall = GUICreate("Wall", 150, 500, 300, 300)
GUISetBkColor(0x808080)
\$WallLabel = GUICtrlCreateLabel("Wall", 8, 8, 25, 17)

;The ball.
\$Ball = GUICreate("Ball", 150, 120, 200, 200)
GUISetBkColor(0x800000)
\$CreateWall = GUICtrlCreateButton("Wall", 85, 80, 49, 17, \$WS_GROUP)
\$BallLabel = GUICtrlCreateLabel("Ball", 95, 60, 21, 17)
_GuiRoundCorners(\$Ball, 75, 75, 75, 75)
GUISetState(@SW_SHOW)
;===================================================================

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit

Case \$CreateWall
;The wall.
GUICtrlSetData(\$WallLabel, "Wall"); update label text if you needed to
GUISetState(@SW_SHOW, \$Wall)
While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd

;==================================================================================
; FUNCTIONS FOR CHECK COLLISSION
;==================================================================================
Func MonitorWindows()
If BitAND(WinGetState(\$Ball), 2) And BitAND(WinGetState(\$Wall), 2) And CheckCollission(\$Ball, \$Wall) Then
ToolTip("collision")
\$size = WinGetPos("Ball")
For \$i = 1 To 10
WinMove("Ball", "", \$size[0] + 5, \$size[1] + 5, \$size[2], \$size[3])
;~             sleep(500)
WinMove("Ball", "", \$size[0] - 5, \$size[1] - 5, \$size[2], \$size[3])
Next
Else
ToolTip("")
EndIf
EndFunc  ;==>MonitorWindows

Func CheckCollission(\$Win1, \$Win2)

\$Win1Pos = WinGetPos(\$Win1)
If @error Then
Return 0
EndIf
\$Win2Pos = WinGetPos(\$Win2)
If @error Then
Return 0
EndIf

If _CheckOverlap(\$Win1Pos, \$Win2Pos) Then Return True
If _CheckOverlap(\$Win2Pos, \$Win1Pos) Then Return True
EndFunc  ;==>CheckCollission

Func _WinGetByPID(\$iPID)
Local \$aWList = WinList()
For \$iCC = 1 To \$aWList[0][0]
If WinGetProcess(\$aWList[\$iCC][1]) = \$iPID And _
BitAND(WinGetState(\$aWList[\$iCC][1]), 2) Then
Return \$aWList[\$iCC][0]
EndIf
Next
Return SetError(1, 0, 0)
EndFunc  ;==>_WinGetByPID

Func _CheckOverlap(\$ar1, \$a2)
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0] + \$ar1[2], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
If _WinAPI_PtInRectEx(\$ar1[0], \$ar1[1] + \$ar1[3], \$a2[0], \$a2[1], \$a2[2], \$a2[3]) Then Return True
EndFunc  ;==>_CheckOverlap

; Note this_WinAPI_PtInRectEx() Not the same as 1st post.
; Here Width & height used, NOT Bottom right corner position.
; Also, declared \$tagREC.  \$tagRECT required WinAPI.au3 to be included.
; Author - Malkey
Func _WinAPI_PtInRectEx(\$iX, \$iY, \$iLeft, \$iTop, \$iWidth, \$iHeight)
Local \$aResult, \$tagREC = "int Left;int Top;int Right;int Bottom"
Local \$tRect = DllStructCreate(\$tagREC)
DllStructSetData(\$tRect, "Left", \$iLeft)
DllStructSetData(\$tRect, "Top", \$iTop)
DllStructSetData(\$tRect, "Right", \$iLeft + \$iWidth)
DllStructSetData(\$tRect, "Bottom", \$iTop + \$iHeight)
\$aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr(\$tRect), "int", \$iX, "int", \$iY)
Return \$aResult[0] <> 0
EndFunc  ;==>_WinAPI_PtInRectEx

Func _GuiRoundCorners(\$h_win, \$i_x1, \$i_y1, \$i_x3, \$i_y3) ; Gary Frost
Local \$XS_pos, \$XS_ret, \$XS_ret2
\$XS_pos = WinGetPos(\$h_win)
\$XS_ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", \$i_x1, "long", \$i_y1, "long", \$XS_pos[2], "long", \$XS_pos[3], "long", \$i_x3, "long", \$i_y3)
If \$XS_ret[0] Then
\$XS_ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", \$h_win, "long", \$XS_ret[0], "int", 1)
EndIf
EndFunc   ;==>_GuiRoundCorners```

8)

Share on other sites

lol, yeah no extra charge for the wall

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Create an account

Register a new account