 			try
 			{
 			fTemp := 1
-			WinMove, ahk_id %targHWnd%, , %dx%, %dy%, %w%, %h%
+			WinMove, ahk_id %hWnd%, , %dx%, %dy%, %w%, %h%
 			}
 			catch x
 			{
 			sleep, 20
-			WinGetPos, x, y, w, h, ahk_id %targHWnd%
+			WinGetPos, x, y, w, h, ahk_id %hWnd%
 				if (w || h)
 				{
 					if (x == dx && y == dy)
 					{
-					MsgBox, 8192, Moving Splashy form, % " WinMove failed for Splashy " targHWnd "."
+					MsgBox, 8192, Moving Splashy form, % " WinMove failed for Splashy " hWnd "."
 					fTemp := 0
 					}
 				}

else
{
	Loop % batchPrgNo
		{
		fTemp := PrgListIndex[A_Index]
		strTemp2 := MonStr(PrgMonToRn, fTemp)
			if (PrgBdyBtchTog[A_Index] == strTemp2)
			strTemp := strTemp . strTemp2 . A_Space . PrgLnchOpt.GetPrgChoiceNames(fTemp) . "|"
			else
			strTemp := strTemp . PrgLnchOpt.GetPrgChoiceNames(fTemp) . "|"
		}
}
return strTemp
}
MonStr(PrgMonToRn, selPrgChoice)

	gui, NonStockResDlg: Destroy
	return 0
}

DisplayActiveWindowProps(index, prgPIDIn := 0)
{
static WS_EX_CONTEXTHELP := 0x00000400
static AWPPrgPriority, AWPPrgMinMax, AWPBordless
static AWPPrgMinMax1, AWPPrgMinMax2, AWPPrgMinMax3, AWPPrgMinMax4, AWPPrgMinMax5, AWPPrgMinMax6, AWPPrgMinMax7, AWPPrgMinMax8, AWPPrgMinMax9, AWPPrgMinMax10, AWPPrgMinMax11, AWPPrgMinMax12
static AWPBordless1, AWPBordless2, AWPBordless3, AWPBordless4, AWPBordless5, AWPBordless6, AWPBordless7, AWPBordless8, AWPBordless9, AWPBordless10, AWPBordless11, AWPBordless12 
fTemp := 1, temp := 0, strTemp := ""
winNames := ["", "", "", "", "", "", "", "", "", "", "", ""]

if (!prgPIDIn)
{
		loop, Parse, % PrgLnchOpt.ListPrgStr, CSV
		{

			if (A_Index == index && strTemp := A_Loopfield)
			{
				loop % PrgLnchOpt.PrgNo
				{
					if (strTemp == PrgLnchOpt.GetPrgChoiceNames(A_Index))
					{
					temp := A_Index
					break
					}
				}

				if (temp == A_Index)
				break
			}
		}

	if (temp)
	{
	index := temp
	}
	else
	MsgBox, 8192, DisplayActiveWindowProps, % "Unexpected error with " . PrgLnchOpt.ListPrgStr(index) . "!"
}
	Loop % PrgLnchOpt.PrgNo
	{
		if (temp := PrgLnchOpt.GetTestWindowHandles(A_Index))
		{
		fTemp := A_Index
		WinGetTitle, strTemp, ahk_id %temp%
		winNames[A_Index] := strTemp
		}
		else
		{
			if (!prgPIDIn)
			WinGet, prgPID, PID, % "ahk_id" . PrgLnchOpt.GetTestWindowHandles(1)
		break
		}
	}

	if (prgPIDIn)
	{
		if (fTemp == 1)
		return
	prgPID := prgPIDIn
	}

	height := A_ScreenHeight/5, numWMIResolutionmodesTmp := 0

	gui, ActiveWindowProp: -MaximizeBox -MinimizeBox +E%WS_EX_CONTEXTHELP% HWNDhWndActiveWindowProp

	Gui, ActiveWindowProp: Add, Checkbox, section w%height% vAWPPrgPriority gAWPPrgPriorityChk HWNDAWPPrgPriorityHwnd Check3, Prg Priority (BN-N-H)

	Gui, ActiveWindowProp: Font, cA96915 Bold
	gui, ActiveWindowProp: add, text, % "section w" . 2.4*height, % "Windows of " PrgLnchOpt.GetPrgChoiceNames(index)

	;check3 enables 3 values in checkbox
	GuiControl, ActiveWindowProp: Enable, AWPPrgPriority
	GuiControl, ActiveWindowProp:, AWPPrgPriority, -1

	Gui, ActiveWindowProp: Font


;fTemp := 2
;winNames[1] := "one"
;winNames[2] := "two"
	Gui, ActiveWindowProp: Add, Groupbox, % "section" . " w" . 2.4*height . " R" . 2*fTemp

		loop %fTemp%
		{
		Gui, ActiveWindowProp: Font, cA96915 Bold
		Gui, ActiveWindowProp: Add, text, % "xs+" . height/8 . " yp+" . height/8 . " w" . height, % winNames[A_Index]
		Gui, ActiveWindowProp: Font
		Gui, ActiveWindowProp: Add, Checkbox, % "xs+" . height/8 . " yp+" . height/8 . " w" . height . " vAWPPrgMinMax" . A_Index . " gAWPClick Check3", Min-Norm-Max
		GuiControl, ActiveWindowProp: Enable, AWPPrgMinMax
		GuiControl, ActiveWindowProp:, AWPPrgMinMax, -1
		Gui, ActiveWindowProp: Add, Checkbox, % "xp+" . height . " yp wp vAWPBordless" . A_Index . " gAWPClick", Borderless
		GuiControl, ActiveWindowProp: Enable, AWPBordless
		}

	Gui, ActiveWindowProp: Font

	;Gui, ActiveWindowProp: Font, cA96915, s10

	;gui, ActiveWindowProp: Font
	;Gui, ActiveWindowProp: Font, cTeal



	gui, ActiveWindowProp: show, % "x" . height "w" . 2.5*height, Active Window Properties

	WinMover(hWndActiveWindowProp, "d r")

	WinWaitClose, ahk_id %hWndActiveWindowProp%
	return

	AWPPrgPriorityChk:
	;prgPID
	return
	AWPClick:
	clickedindex := 0
	loop % fTemp
	{
		if (InStr(%A_GuiControl%, fTemp - A_Index + 1))
		{
		clickedindex := fTemp - A_Index + 1
		break
		}
	}
	;GetPrgMinMax(index, clickedindex)
	;GetPrgWindowStyles(index, clickedindex)
	return

	AWPQuit:
	ActiveWindowPropGuiClose:
	gui, ActiveWindowProp: Destroy
	return 0
