Yashied Posted December 21, 2010 Share Posted December 21, 2010 (edited) This is just an example. Do with it what you want... expandcollapse popup#Include <Constants.au3> #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> #Include <TabConstants.au3> #Include <WindowsConstants.au3> Dim $Pic[5] GUICreate('MyGUI', 705, 369) GUISetBkColor(0xFFFFFF) GUICtrlCreatePic('img_bg.bmp', 0, 0, 705, 369) GUICtrlSetState(-1, $GUI_DISABLE) For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 10, 24 + 50 * $i, 162, 49) GUICtrlCreateLabel('Tabsheet' & $i, 21, 40 + 50 * $i, 140, 18, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next $Tab = GUICtrlCreateTab(172 + 4, 10 + 4, 523 - 8, 349 - 8) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateTabItem('Tabsheet0') GUICtrlCreateEdit('', 190, 28, 487, 313) GUICtrlCreateTabItem('Tabsheet1') GUICtrlCreateButton('OK', 398, 319, 70, 23) GUICtrlCreateTabItem('Tabsheet2') GUICtrlCreateTabItem('Tabsheet3') GUICtrlCreateTabItem('Tabsheet4') GUICtrlCreateTabItem('') GUISetState() $Item = -1 $Over = -1 While 1 $Info = GUIGetCursorInfo() If @error Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf $Over = -1 Else $Index = _Index($Info[4]) If $Index <> $Over Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf If ($Index <> -1) And ($Index <> $Item) Then GUICtrlSetImage($Pic[$Index], @ScriptDir & '\img_over.bmp') $Over = $Index Else $Over = -1 EndIf EndIf EndIf $Msg = GUIGetMsg() If $Item = -1 Then $Msg = $Pic[0] $Item = 1 EndIf Switch $Msg Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Pic[0] To $Pic[UBound($Pic) - 1] If $Msg <> $Pic[$Item] Then GUICtrlSetImage($Pic[$Item], @ScriptDir & '\img_black.bmp') GUICtrlSetcolor($Pic[$Item] + 1, 0xFFFFFF) GUICtrlSetImage($Msg, @ScriptDir & '\img_white.bmp') GUICtrlSetcolor($Msg + 1, 0x313A42) $Item = _Index($Msg) GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, $Item, 0) $Over = -1 EndIf EndSwitch WEnd Func _Index($CtrlID) For $i = 0 To UBound($Pic) - 1 If ($CtrlID = $Pic[$i]) Or ($CtrlID = $Pic[$i] + 1) Then Return $i EndIf Next Return -1 EndFunc ;==>_IndexTabSkin.zipPrevious downloads: 774TabSkin.zip Edited December 22, 2013 by Yashied qsek 1 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
wakillon Posted December 22, 2010 Share Posted December 22, 2010 Great look !Thanks Yashield ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
funkey Posted December 22, 2010 Share Posted December 22, 2010 Very nice! I like it! Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
FireFox Posted December 22, 2010 Share Posted December 22, 2010 Nice work Br, FireFox. Link to comment Share on other sites More sharing options...
Valuater Posted December 22, 2010 Share Posted December 22, 2010 (edited) Your pic looks good. Tested... Very Nice!! Thx 8) Edited August 5, 2011 by Valuater Link to comment Share on other sites More sharing options...
guinness Posted December 22, 2010 Share Posted December 22, 2010 (edited) I get the same as Yashied, seems your images aren't loading. You did download the ZIP File? How could it have been so simple. Brilliant Example! Edited December 22, 2010 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
James Posted December 23, 2010 Share Posted December 23, 2010 How could it be so simple!Beautiful! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
FireFox Posted December 23, 2010 Share Posted December 23, 2010 Your pic looks good. Mine... Not so much. 8) Don't forget to extract files before executing the script Br, FireFox. Link to comment Share on other sites More sharing options...
HAL9000 Posted December 25, 2010 Share Posted December 25, 2010 an example with horizontal tab? Link to comment Share on other sites More sharing options...
James Posted December 26, 2010 Share Posted December 26, 2010 an example with horizontal tab? You'd have to change the img_bg.bmp to show a horizontal layout and then perhaps the tab images too. In the code you're looking for the For.. Next loop For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 10, 24 + 50 * $i, 162, 49) GUICtrlCreateLabel('Tabsheet' & $i, 21, 40 + 50 * $i, 140, 18, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next Just change the X,Y coordinates and you're on your way! James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Mikeman27294 Posted July 19, 2011 Share Posted July 19, 2011 Perfect! Link to comment Share on other sites More sharing options...
engjcowi Posted July 21, 2011 Share Posted July 21, 2011 For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 10 + 50 * $i, 24 , 162, 49) GUICtrlCreateLabel('Tabsheet' & $i, 21, 40 + 50 * $i, 140, 18, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next Hi sorry to be a pain ive tried to change the X and Y and it doesnt seem to get me anywhere. Could you direct me more as to where im going wrong please? thank you Drunken Frat-Boy Monkey Garbage Link to comment Share on other sites More sharing options...
Mikeman27294 Posted July 23, 2011 Share Posted July 23, 2011 (edited) Yes... I am having problems too. I changed it to work with GIFs, and also changed it so it is similar to the tabs in Firefox. Then I implemented extended glass and now when I click the tabs, nothing happens, and when I hover over the second tab, nothing happens then either. Also happened to the backup script, which, was the one Yashied made.What problem are you getting?EDITOk, I downloaded the tabskin file again and implemented your for script. The problem that you are having, is that you are making them too wide, but you are not spacing them that wide apart. Also, you have not moved the labels. Once that is done, you would want to resize the editbox. But I will go right ahead and do that for you. And if you wanted them on top, wait a few days (surely not much longer any more), as I am making a script which has extended title transparency (which you can comment out if you are using XP), horizontal tabs on top, and a file menu. My aim is to get it to look alike the ribbon from office 2010. Anyway, here is your code:expandcollapse popup#Include <Constants.au3> #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> #Include <TabConstants.au3> #Include <WindowsConstants.au3> Dim $Pic[5] GUICreate('MyGUI', 705, 369) GUISetBkColor(0xFFFFFF) GUICtrlCreatePic('img_bg.bmp', 0, 0, 705, 369) GUICtrlSetState(-1, $GUI_DISABLE) For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 190 + 50 * $i, 20 , 50, 20) GUICtrlCreateLabel('Tab ' & $i, 190+50*$i, 21 , 50, 20, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next $Tab = GUICtrlCreateTab(172 + 4, 10 + 4, 523 - 8, 349 - 8) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateTabItem('Tabsheet0') GUICtrlCreateEdit('', 190, 48, 487, 293) GUICtrlCreateTabItem('Tabsheet1') GUICtrlCreateButton('OK', 398, 319, 70, 23) GUICtrlCreateTabItem('Tabsheet2') GUICtrlCreateTabItem('Tabsheet3') GUICtrlCreateTabItem('Tabsheet4') GUICtrlCreateTabItem('') GUISetState() $Item = -1 $Over = -1 While 1 $Info = GUIGetCursorInfo() If @error Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf $Over = -1 Else $Index = _Index($Info[4]) If $Index <> $Over Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf If ($Index <> -1) And ($Index <> $Item) Then GUICtrlSetImage($Pic[$Index], @ScriptDir & '\img_over.bmp') $Over = $Index Else $Over = -1 EndIf EndIf EndIf $Msg = GUIGetMsg() If $Item = -1 Then $Msg = $Pic[0] $Item = 1 EndIf Switch $Msg Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Pic[0] To $Pic[UBound($Pic) - 1] If $Msg <> $Pic[$Item] Then GUICtrlSetImage($Pic[$Item], @ScriptDir & '\img_black.bmp') GUICtrlSetcolor($Pic[$Item] + 1, 0xFFFFFF) GUICtrlSetImage($Msg, @ScriptDir & '\img_white.bmp') GUICtrlSetcolor($Msg + 1, 0x313A42) $Item = _Index($Msg) GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, $Item, 0) $Over = -1 EndIf EndSwitch WEnd Func _Index($CtrlID) For $i = 0 To UBound($Pic) - 1 If ($CtrlID = $Pic[$i]) Or ($CtrlID = $Pic[$i] + 1) Then Return $i EndIf Next Return -1 EndFunc ;==>_IndexThat is the whole file. I hope that is what you were trying to achieve. If not, then please let up know, maybe whip up a quick image in paint showing us the positionings and all of that sort of stuff, and I am sure everyone will be happy to help. Edited July 23, 2011 by Mikeman27294 Link to comment Share on other sites More sharing options...
Mikeman27294 Posted July 23, 2011 Share Posted July 23, 2011 (edited) Ok, here is my little problem. (I hope you dont mind me placing it here? Otherwise, just PM me or something and ask me to delete it and I will). With my program, I am trying to get a ribbon alike interface working. I have a file tab, but that is not created in the for loop, as it is not going to have the same image. The problem is, that when I am in the file tab, I cannot select the edit tab. The script also will not change the image of the file button on hover from the home tab, and does not appear to change when I enter the file menu. As for the buttons in each tab, dont mind them, they are just so that I can focus on the ribbon when I am changing tabs, and will see it move without needing to focus on it. Also, dont worry about the tab control, I have found that that part still works perfectly fine, even when the GUI Controls are outside it and it is outside the window. Here is the code. expandcollapse popup#Region###STARTUP### #include <Array.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> Local $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;") Local $sStruct = DllStructCreate("dword;int;ptr;int") Local $MyArea[4] = [0, 0, 31, 0] Local $devyesno = MsgBox(4,Default,"Press yes to enable the Design tab, or no to disable it.") Local $Filehover If $devyesno = 6 Then Global $Tabnums=5 Else Global $Tabnums=4 EndIf Dim $Pic[$Tabnums] If $Tabnums=5 Then Dim $TabText[5] $TabText[4] = "Design" $TabText[3] = "Program" $TabText[2] = "View" $TabText[1] = "Edit" $TabText[0] = "Home" ElseIf $Tabnums=4 Then Dim $TabText[4] $TabText[3] = "Program" $TabText[2] = "View" $TabText[1] = "Edit" $TabText[0] = "Home" EndIf $hGUI=GUICreate('MyGUI', 705, 369, 100, 100) _Vista_ApplyGlassArea($hGUI) Global $Winpos=WinGetPos("MyGUI") Global $GlassArea = GUICtrlCreateLabel("", (UBound($Pic)+1)*90, 0, $Winpos[2]-(UBound($Pic)+1)*90, 32) ;area that will be filled with glass GUICtrlSetBkColor(-1, 0x000000) Global $DarkGreyArea = GUICtrlCreateGraphic(0, (UBound($Pic)+1)*90, $Winpos[2]-(UBound($Pic)+1)*90, 32) ;work area (to add controls in) GUICtrlSetBkColor(-1, 0xC5C5C5) ;with light grey area #region $File=GUICtrlCreatePic(@ScriptDir & '\tab_filedefault.bmp', 0, 0, 90, 29) GUICtrlCreateLabel("File", 0, 7, 90, 29, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) #EndRegion For $i = 0 To $Tabnums-1 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\tab_default.bmp', 90*($i+1), 0, 90, 29) GUICtrlCreateLabel($TabText[$i], 90*($i+1), 7, 90, 29, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0x000000) Next $Tab = GUICtrlCreateTab(-@DesktopWidth, -@DesktopHeight, 0, 0) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateTabItem('File') GUICtrlCreateButton('File', 290, 319, 70, 23) GUICtrlCreateTabItem('Home') GUICtrlCreateButton('Home', 300, 319, 70, 23) GUICtrlCreateTabItem('Edit') GUICtrlCreateButton('Edit', 310, 319, 70, 23) GUICtrlCreateTabItem('View') GUICtrlCreateButton('View', 320, 319, 70, 23) GUICtrlCreateTabItem('Program') GUICtrlCreateButton('Program', 340, 319, 70, 23) GUICtrlCreateTabItem('Design') GUICtrlCreateButton('Design', 350, 319, 70, 23) GUICtrlCreateTabItem('') GUISetState() $Item = -1 $Over = -1 #EndRegion###STARTUP### While 1 $Info = GUIGetCursorInfo() If @error Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\tab_default.bmp') GUICtrlSetImage($File, @ScriptDir & '\tab_filedefault.bmp') $Filehover=0 EndIf GUICtrlSetImage($File, @ScriptDir & '\tab_filedefault.bmp') $Filehover=0 $Over = -1 Else $Index = _Index($Info[4]) If $Index <> $Over Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\tab_default.bmp') GUICtrlSetImage($File, @ScriptDir & '\tab_filedefault.bmp') $Filehover=0 EndIf If ($Index <> -1) And ($Index <> $Item) Then GUICtrlSetImage($File, @ScriptDir & '\tab_filedefault.bmp') GUICtrlSetImage($Pic[$Index], @ScriptDir & '\tab_hover.bmp') $Over = $Index $Filehover=0 Else GUICtrlSetImage($File, @ScriptDir & '\tab_filedefault.bmp') $Filehover=0 $Over = -1 EndIf If $Info[4]=6 or $Info[4]=5 And $Filehover=0 Then GUICtrlSetImage($File, @ScriptDir & '\tab_filehover.bmp') $Filehover=1 EndIf EndIf EndIf $Msg = GUIGetMsg() If $Item = -1 Then $Msg = $Pic[0] $Item = 1 EndIf Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $Pic[0] To $Pic[UBound($Pic) - 1] If $Msg <> $Pic[$Item] Then GUICtrlSetImage($Pic[$Item], @ScriptDir & '\tab_default.bmp') GUICtrlSetImage($Msg, @ScriptDir & '\tab_filedefault.bmp') GUICtrlSetImage($Msg, @ScriptDir & '\tab_selected.bmp') $Item = _Index($Msg) GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, $Item+1, 0) $Over = -1 EndIf Case $File GUICtrlSetImage($Pic[$Item], @ScriptDir & '\tab_default.bmp') GUICtrlSetImage($Msg, @ScriptDir & '\tab_fileselected.bmp') GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, 0, 0) $Filehover=2 $Item=1 Case $GlassArea dllcall("user32.dll","int","SendMessage","hWnd", $hGUI,"int",0xA1,"int", 2,"int", 0) EndSwitch WEnd Func _Index($CtrlID) For $i = 0 To UBound($Pic) - 1 If ($CtrlID = $Pic[$i]) Or ($CtrlID = $Pic[$i] + 1) Then Return $i EndIf Next Return -1 EndFunc ;==>_Index Func _Vista_ApplyGlassArea($hWND=$hGUI, $Area=$MyArea, $bColor = 0x000000) If @OSVersion <> "WIN_VISTA" And @OSVersion <> "WIN_7" Then MsgBox(16, "_Vista_ApplyGlass", "You are not running Vista!") Exit Else If _Vista_ICE() Then If IsArray($Area) Then DllStructSetData($Struct, "cxLeftWidth", $Area[0]) DllStructSetData($Struct, "cxRightWidth", $Area[1]) DllStructSetData($Struct, "cyTopHeight", $Area[2]) DllStructSetData($Struct, "cyBottomHeight", $Area[3]) GUISetBkColor($bColor); Must be here! $Ret = DllCall("dwmapi.dll", "long*", "DwmExtendFrameIntoClientArea", "hwnd", $hWnd, "ptr", DllStructGetPtr($Struct)) If @error Then Return 0 Else Return $Ret EndIf Else MsgBox(16, "_Vista_ApplyGlassArea", "Area specified is not an array!") EndIf Else MsgBox(0, "DWM Not Enabled", "DWM is not enabled!") EndIf EndIf EndFunc ;==>_Vista_ApplyGlassArea Func _Vista_ICE() $ICEStruct = DllStructCreate("int;") $Ret = DllCall("dwmapi.dll", "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($ICEStruct)) If @error Then Return 0 Else Return DllStructGetData($ICEStruct, 1) EndIf EndFunc ;==>_Vista_ICE Does anybody see a problem there? Anything and I would be greatful. Also, this uses aero glass so will not run on XP. If you want to run it on XP, you will have to comment out lines:6 to 8,32 to 37, and 141 onwards. (Although it would be interesting to see what would happen on an XP machine... maybe I will download XP mode just to take a look ) Thanks. Edited July 24, 2011 by Mikeman27294 Link to comment Share on other sites More sharing options...
engjcowi Posted August 5, 2011 Share Posted August 5, 2011 Hi Mikeman thanks thats a great start to what i want to achieve. i want it larger lol, basically like the original example but with the tabs on the top (hope im making snese) but its a great example fo rme to start playing with now thanks jamie Yes... I am having problems too. I changed it to work with GIFs, and also changed it so it is similar to the tabs in Firefox. Then I implemented extended glass and now when I click the tabs, nothing happens, and when I hover over the second tab, nothing happens then either. Also happened to the backup script, which, was the one Yashied made. What problem are you getting? EDIT Ok, I downloaded the tabskin file again and implemented your for script. The problem that you are having, is that you are making them too wide, but you are not spacing them that wide apart. Also, you have not moved the labels. Once that is done, you would want to resize the editbox. But I will go right ahead and do that for you. And if you wanted them on top, wait a few days (surely not much longer any more), as I am making a script which has extended title transparency (which you can comment out if you are using XP), horizontal tabs on top, and a file menu. My aim is to get it to look alike the ribbon from office 2010. Anyway, here is your code: expandcollapse popup#Include <Constants.au3> #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> #Include <TabConstants.au3> #Include <WindowsConstants.au3> Dim $Pic[5] GUICreate('MyGUI', 705, 369) GUISetBkColor(0xFFFFFF) GUICtrlCreatePic('img_bg.bmp', 0, 0, 705, 369) GUICtrlSetState(-1, $GUI_DISABLE) For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 190 + 50 * $i, 20 , 50, 20) GUICtrlCreateLabel('Tab ' & $i, 190+50*$i, 21 , 50, 20, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next $Tab = GUICtrlCreateTab(172 + 4, 10 + 4, 523 - 8, 349 - 8) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateTabItem('Tabsheet0') GUICtrlCreateEdit('', 190, 48, 487, 293) GUICtrlCreateTabItem('Tabsheet1') GUICtrlCreateButton('OK', 398, 319, 70, 23) GUICtrlCreateTabItem('Tabsheet2') GUICtrlCreateTabItem('Tabsheet3') GUICtrlCreateTabItem('Tabsheet4') GUICtrlCreateTabItem('') GUISetState() $Item = -1 $Over = -1 While 1 $Info = GUIGetCursorInfo() If @error Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf $Over = -1 Else $Index = _Index($Info[4]) If $Index <> $Over Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf If ($Index <> -1) And ($Index <> $Item) Then GUICtrlSetImage($Pic[$Index], @ScriptDir & '\img_over.bmp') $Over = $Index Else $Over = -1 EndIf EndIf EndIf $Msg = GUIGetMsg() If $Item = -1 Then $Msg = $Pic[0] $Item = 1 EndIf Switch $Msg Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Pic[0] To $Pic[UBound($Pic) - 1] If $Msg <> $Pic[$Item] Then GUICtrlSetImage($Pic[$Item], @ScriptDir & '\img_black.bmp') GUICtrlSetcolor($Pic[$Item] + 1, 0xFFFFFF) GUICtrlSetImage($Msg, @ScriptDir & '\img_white.bmp') GUICtrlSetcolor($Msg + 1, 0x313A42) $Item = _Index($Msg) GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, $Item, 0) $Over = -1 EndIf EndSwitch WEnd Func _Index($CtrlID) For $i = 0 To UBound($Pic) - 1 If ($CtrlID = $Pic[$i]) Or ($CtrlID = $Pic[$i] + 1) Then Return $i EndIf Next Return -1 EndFunc ;==>_Index That is the whole file. I hope that is what you were trying to achieve. If not, then please let up know, maybe whip up a quick image in paint showing us the positionings and all of that sort of stuff, and I am sure everyone will be happy to help. Drunken Frat-Boy Monkey Garbage Link to comment Share on other sites More sharing options...
knightz93 Posted August 6, 2011 Share Posted August 6, 2011 thanks to Yashied.. i am new user.. for my college project, i try to apply you tab skin and work perfectly.. [font=verdana,geneva,sans-serif]I will do my best in this forum [/font][font=verdana,geneva,sans-serif]my code :[/font] WindowsSwitcher3d() Link to comment Share on other sites More sharing options...
LutherBlissett Posted August 19, 2012 Share Posted August 19, 2012 I'd love to use this script but I can't change the tab names, changing the GUICtrlCreateLabel('Tabsheet' changes every tab to be the same name, and changing what looks like the tab names underneath that code does not do anything. I'd greatly appreciate any help. Link to comment Share on other sites More sharing options...
BrewManNH Posted August 19, 2012 Share Posted August 19, 2012 The example script just creates 5 tabs with the same name but with a different number after it. You'd need to create the tabs yourself, and not use the For/Next loop to do it. As far as I can tell, the TabItem names are just there to let you know they're relation to the actual tab items created above, changing the text in there doesn't do anything to the displayed items. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
LutherBlissett Posted August 19, 2012 Share Posted August 19, 2012 Ok, Yeah I got the idea it was just for demonstration, and tried experimenting a bit but couldn't get it right, thank you for the tip though. Link to comment Share on other sites More sharing options...
jackie68 Posted September 24, 2012 Share Posted September 24, 2012 I can't switch to another tabsheet when "GUIOnEventMode" is ON If I turn off it will work but I can't capture event on button click, can any1 help? Link to comment Share on other sites More sharing options...
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