Jump to content
Sign in to follow this  
Helomotorola

How does to Highlight Window?

Recommended Posts

Helomotorola

How does to Highlight Window??

Thank

Share this post


Link to post
Share on other sites
ksmith247

How does to Highlight Window??

Thank

WinActivate()

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites
Helomotorola

Hix, I want anwer about Highlight a windows

It'll creat border with a color to encompass windows (same info tool)

Share this post


Link to post
Share on other sites
dabus

Search. :)

My guess would be for CreatePen.

You could use something like this to get the highlight done.

By Valery

#include <GUIConstants.au3>
Global $Transp_Flag = 100
Global $user = DllOpen("user32.dll")
Global $gdi = DllOpen("gdi32.dll")
Global $hDC, $Pen

HotKeySet("{Esc}", "On_Escape")

$hWnd = GUICreate("box", 600, 400, -1,  -1, $WS_POPUP)
WinSetTrans ($hWnd, "", $Transp_Flag)
$hDC = DllCall($user, "int", "GetDC", "hwnd", $hWnd)
$hDC = $hDC[0]
$Pen = DllCall($gdi, "int", "CreatePen", "int", 0, "int", 4, "int", 0x00AAFF)
$Pen = $Pen[0]
DllCall($gdi, "int", "SelectObject", "int", $hDC, "int", $Pen)

GUISetState(@SW_SHOW)

$x1 = 10
$x2 = 590
$y1 = 10
$y2 = 390
DrawBox($x1, $y1, $x2, $y2)

While 1
$Msg = GUIGetMsg()
if $Msg = $GUI_EVENT_CLOSE then ExitLoop
WEnd


func On_Escape()
DllCall($user, "int", "ReleaseDC", "hwnd", 0, "int", $hDC)
DllClose($user)
DllClose($gdi)
  exit
endfunc

Func DrawBox($x1, $y1, $x2, $y2)
if $x1 = '' or $x2 = '' then return
DllCall($gdi, "int", "MoveToEx", "hwnd", $hDC, "int", $x1, "int", $y1, "int", 0)
DllCall($gdi, "int", "LineTo", "hwnd", $hDC, "int", $x1, "int", $y2)
DllCall($gdi, "int", "LineTo", "hwnd", $hDC, "int", $x2, "int", $y2)
DllCall($gdi, "int", "LineTo", "hwnd", $hDC, "int", $x2, "int", $y1)
DllCall($gdi, "int", "LineTo", "hwnd", $hDC, "int", $x1, "int", $y1)
EndFunc
Edited by dabus

Share this post


Link to post
Share on other sites
Helomotorola

Cool

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  

×