Josbe Posted August 7, 2004 Posted August 7, 2004 (edited) AXWindow - (AutoIt eXperimental Window)A simple experimental window, replacing the Window's standard title.- Features: 'Cut' window, Set on Top, some customizable things...Requirement: AutoIt v3.0.102+ beta (GUI version) : You maybe could replace with pics the 'title' or some like that... Some ideas based from: CyberSlug, Adam (Red) I conceptualize this ideas, finding new ways to customize a GUI creation. Feel free to improve it. -------------------------------------------------------->>> http://www.autoitscript.com/fileman/users/public/!Josbe/_xperimental/axwindow/axwindow.au3 <<<-------------------------------------------------------- Edited August 7, 2004 by josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Abilio_KID Posted August 7, 2004 Posted August 7, 2004 Now make it with a custom border or even transparent
CyberSlug Posted August 8, 2004 Posted August 8, 2004 Cool P.S. The "cut" window feature is typically known as "roll-up" or "shade" Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
CyberSlug Posted March 25, 2005 Posted March 25, 2005 Here is Josbe's script updated for AutoIt 3.1.0++ expandcollapse popup;// AXWindow - AutoIt eXperimental Window (7/08/2004) ;// By: 'Josbe' (mrjosbe AT yahoo DOT com) ;// Based in Ideas: CyberSlug, Rednhead (http://www.hiddensoft.com/forum) ;// Requirement: AutoIt v3.0.102+ (GUI version) _AXWindow() Exit Func _AXWindow() ;// AutoIt Options Opt("WinWaitDelay",20); If the value is less, it's more easy to move the window. Opt("GuiResizeMode",800); ;// Window's settings $wTITLE="AXWindow-My flat window" $wHEIGHT=365 $wWIDTH=365 $wTITHEIGHT=16 $wColorFont_Title=0xFFFFFF $wColorBack_Title=0x0BAFEE $wFont_Title="Arial" Local $MOVE_MODE=0,$OFFSET ;// Default states $wStateTop=1;// State by default for window. :: 0 = remove on top flag, 1=set on top flag $mAnimate=1;// Default state mode for animate 'resizing' the window. :: 0= remove this mode, 1=set this mode on ;// GUI Vars $WS_EX_STATICEDGE=0x00020000 $WS_EX_CLIENTEDGE=0x00000200 $WS_POPUP=0x80000000 $WS_EX_DLGMODALFRAME=0x00000001 $WS_BORDER=0x00800000 $WS_THICKFRAME=0x00040000 $BS_FLAT=32768 $BS_CENTER =768 $BS_PUSHLIKE=0x1000 ;// Finding default Window's color. Function ::RGB 2 HEX $rgbComp=StringSplit(StringStripWS(RegRead("HKCU\Control Panel\Colors","ButtonFace"),3),"") $_hexWinColor=Hex(BitAND($rgbComp[1],255),2)&Hex(BitAND($rgbComp[2],255),2)&Hex(BitAND($rgbComp[3],255),2) ;// >>>==[ WINDOW DEFINITION ]===>>> If 1 Then; This "IF" only for collapse [+] in the editor (Scite). GUICreate($wTITLE,$wWIDTH,$wHEIGHT,-1,-1,$WS_POPUP+$WS_BORDER) GuiSetIcon('') GuiSetBkColor(Dec($_hexWinColor)) ;// TITLE DEFINITION GuiSetFont(10,700,0,$wFont_Title) $wTITLEBorder=GUICtrlCreateLabel(''&$wTITLE,0,0,$wWIDTH-80,$wTITHEIGHT) GuiCtrlSetResizing($wTITLEBorder,'') GuiCtrlSetTip($wTITLEBorder,'') GuiCtrlSetLimit($wTITLEBorder,$wColorFont_Title) GuiCtrlSetBkColor($wTITLEBorder,$wColorBack_Title) ;// ==> BUTTONS DEFINITION - START GuiSetFont(9,300,0,'Wingdings') ; ASCII Characters for icons $charM="y" $charX="x" If $wStateTop=0 Then $chrSTop='m' Else $chrSTop='l' EndIf $btnTop=GUICtrlCreateButton($chrSTop,$wWIDTH-80,0,20,16,$BS_FLAT) GuiCtrlSetResizing(-1,'') GuiCtrlSetTip(-1,'Always on top') Global $btnMin=GUICtrlCreateButton('Ú',$wWIDTH-60,0,20,16,$BS_FLAT) GuiCtrlSetResizing(-1,'') GuiCtrlSetTip(-1,'Minimize') Global $btnCut=GUICtrlCreateButton($charM,$wWIDTH-40,0,20,16,$BS_FLAT) GuiCtrlSetResizing(-1,'') GuiCtrlSetTip(-1,'Cut window') Global $btnClose=GUICtrlCreateButton($charX,$wWIDTH-20,0,20,16,$BS_FLAT) GuiCtrlSetResizing(-1,'') GuiCtrlSetTip(-1,'Close') GuiSetFont(9); Font by default Global $btnHello=GUICtrlCreateButton('Hello World',$wWIDTH/2-50,$wHEIGHT/2-10,100,20) ;// <== BUTTONS DEFINITION - END EndIf ;// <<<==[ WINDOW DEFINITION ]===<<< GuiSetState(@SW_SHOW) ;// Setting value WinSetOnTop($wTITLE,"",$wStateTop) While WinExists($wTITLE) Sleep(10) ;// MOVE MODE - Title If $MOVE_MODE Then $mouse=MouseGetPos() WinMove($wTITLE,"",$mouse[0]+$x_offset,$mouse[1]+$y_offset) EndIf $msg=GuiGetMsg() Select Case $msg=$btnClose Exit Case $msg=$btnCut $oWWD=Opt("WinWaitDelay",1) $wPos=WinGetPos($wTITLE) If $wPos[3]<>$wTITHEIGHT Then If $mAnimate=1 Then For $t=$wHEIGHT to $wTITHEIGHT step-6 WinMove($wTITLE,'',$wPos[0],$wPos[1],$wWIDTH,$t-1) Next WinMove($wTITLE,'',$wPos[0],$wPos[1],$wWIDTH,$wTITHEIGHT) Else WinMove($wTITLE,'',$wPos[0],$wPos[1],$wWIDTH,$wTITHEIGHT) EndIf ControlSetText($wTITLE,'','Button3','p') ControlFocus($wTITLE,"","Static1"); remove the focus Else If $mAnimate=1 Then For $t=$wTITHEIGHT to $wHEIGHT Step 6 WinMove($wTITLE,'',$wPos[0],$wPos[1],$wWIDTH,$t) Next Else WinMove($wTITLE,'',$wPos[0],$wPos[1],$wWIDTH,$wHEIGHT) EndIf ControlSetText($wTITLE,'','Button3',$charM) ControlFocus($wTITLE,"","Static1") EndIf Opt("WinWaitDelay",$oWWD) ContinueLoop Case $msg=$btnTop If $wStateTop=0 Then ControlSetText($wTITLE,'','Button1','l') ControlFocus($wTITLE,"","Static1"); remove the focus $wStateTop=1 Else ControlSetText($wTITLE,'','Button1','m') ControlFocus($wTITLE,"","Static1"); remove the focus $wStateTop=0 EndIf WinSetOnTop($wTITLE,"",$wStateTop) Case $msg=$btnMin WinSetState($wTITLE,"",@SW_MINIMIZE) Case $msg=$btnHello MsgBox(4096,"","Hello World!") Case $msg=$wTITLEBorder $MOVE_MODE=Not $MOVE_MODE;toggle mode ;// Calculate relative offset between window and mouse If $MOVE_MODE Then $mouse=MouseGetPos() $window=WinGetPos($wTITLE) $x_offset=$window[0]-$mouse[0] $y_offset=$window[1]-$mouse[1] GuiCtrlSetTip($wTITLEBorder,"Moving...") GuiCtrlSetLimit($wTITLEBorder,0xFFFFFF) GuiCtrlSetBkColor($wTITLEBorder,0x000000) Else GuiCtrlSetTip($wTITLEBorder,"Move") GuiCtrlSetLimit($wTITLEBorder,$wColorFont_Title) GuiCtrlSetBkColor($wTITLEBorder,$wColorBack_Title) EndIf EndSelect Wend EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
layer Posted March 25, 2005 Posted March 25, 2005 yay! now were getting into the GUI customability stage FootbaG
BigDaddyO Posted March 25, 2005 Posted March 25, 2005 That is sooo cool. Hmm, which of my scripts can I put that feature into???
quaizywabbit Posted March 25, 2005 Posted March 25, 2005 very nice work!!!!!!!! i like the "cut" feature [u]Do more with pre-existing apps![/u]ANYGUIv2.8
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now