Jump to content

Search the Community

Showing results for tags 'sliding'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. This is a basic UDF to create nice slideshows. There are a lot of customizable options so it might be useful in some projects. Here is an example: #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 4 -w 5 -w 6 -w 7 #Au3Stripper_Parameters=/sf /sv /mo /rm /rsln #include "Slideshow.au3" Global $avImage[4] = [ _ 'https://lh5.googleusercontent.com/p/AF1QipM3jIOsqrISfcKwgYLYF8-9DyAzQiUyWmB35nBj=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipMPb5fGtzZz2ZJFd20CV2trNzmxNOYLv4abJSfi=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipPLOXRwTpKbFxNNLTmiLrIJlG_H3h4VU6HShLwf=w540-h312-n-k-no', _ 'https://lh5.googleusercontent.com/p/AF1QipPNiwx1lGPxcHJzKTMRl5Cyr1SOjS05yHbif8BE=w540-h312-n-k-no' _ ] Global $asCaptions[4] = ['Pico do Fogo', 'Praia da Chave', 'Buracona - Blue Eye Cave', 'Deserto de Viana'] Global $mOptions[] $mOptions['ImageType'] = 'URL' $mOptions['Captions'] = $asCaptions $mOptions['ShowCaptions'] = True Global $sTitle = 'Cape Verde' Global $sText = 'Cape Verde or Cabo Verde, officially the Republic of Cabo Verde, is an archipelago and island country of West Africa in the central Atlantic Ocean, ' & _ 'consisting of ten volcanic islands with a combined land area of about 4,033 square kilometres (1,557 sq mi). These islands lie between 600 and 850 kilometres ' & _ '(320 and 460 nautical miles) west of Cap-Vert, the westernmost point of continental Africa. The Cape Verde islands form part of the Macaronesia ecoregion, ' & _ 'along with the Azores, the Canary Islands, Madeira, and the Savage Isles.' Global $sExtraText = "Cape Verde's official language is Portuguese. The recognized national language is Cape Verdean Creole, which is spoken by the vast " & _ "majority of the population. As of the 2021 census the most populated islands were Santiago, where the capital Praia is located (269,370), São Vicente (74,016), " & _ "Santo Antão (36,632), Fogo (33,519) and Sal (33,347). The largest cities are Praia (137,868), Mindelo (69,013), Espargos (24,500) and Assomada (21,297)." Global $sCopyright = 'Sources for pictures and data are from google.com and wikipedia.com' Global $hGUI, $cTitle, $cText, $cExtra, $cCopyright, $mSlideshow _GDIPlus_Startup() $hGUI = GUICreate('Slideshow', 870, 450) $cTitle = GUICtrlCreateLabel($sTitle, 10, 10, 300, 60) $cText = GUICtrlCreateLabel($sText, 10, 90, 300, 240) $cExtra = GUICtrlCreateLabel($sExtraText, 10, 330, 850, 80) $cCopyright = GUICtrlCreateLabel($sCopyright, 10, 420, 850, 20) $mSlideshow = _GUICtrlSlideshow_Create($hGUI, 320, 10, 540, 312, $avImage, $mOptions) GUICtrlSetFont($cTitle, 35, 600, 0, 'Segoe UI') GUICtrlSetFont($cText, 11, 500, 0, 'Segoe UI') GUICtrlSetFont($cExtra, 11, 500, 0, 'Segoe UI') GUICtrlSetFont($cCopyright, 11, 500, 2, 'Segoe UI') GUICtrlSetColor($cTitle, 0x000060) GUICtrlSetColor($cCopyright, 0x800000) GUISetState(@SW_SHOW, $hGUI) While True If _GUICtrlSlideshow_ButtonEvent($mSlideshow, $SLIDESHOW_PREV_BTN) Then _GUICtrlSlideshow_ShowSlide($mSlideshow, $BTN_EVENT_PREV) If _GUICtrlSlideshow_ButtonEvent($mSlideshow, $SLIDESHOW_NEXT_BTN) Then _GUICtrlSlideshow_ShowSlide($mSlideshow, $BTN_EVENT_NEXT) Switch GUIGetMsg() Case -3 ExitLoop EndSwitch WEnd _GUICtrlSlideshow_Delete($mSlideshow) _GDIPlus_Shutdown() There might be some hidden bugs. If you encounter any just let me know. Tip: use SlideshowEx.au3 if you don't want to preload the images Slideshow.au3SlideshowEx.au3
  2. Hi guys, I have a qustion involving sliding guis. I wanted my gui to be able to slide out (so I can have more hidden options and the like). So I followed the guide in this excellent link: Sure enough it worked and I have a sliding GUI now..... But there is just one problem (one that poster Rishav had but the question was never answered). The width of the child GUI that slides out is always the same as the parent button. This is annoying, because I want a button with dimensions (30,50) to slide out a child Gui that has dimensions almost the size of the parent gui (lets just say 500,300). So can anybody tell me how I can fix this? I tried manually changing the child gui's height but to no avail. As a code reference I'll post sandin's original example: (if that can be modified so that hte child gui is longer than I can surely fix my own). #include #include #Include ;Global Const $WM_ENTERSIZEMOVE = 0x0231 ;Global Const $WM_EXITSIZEMOVE = 0x0232 $main_height = 300 ;height of the pop-up window $slide_speed = 500 ;window pop-up/down speed, bigger number = slower, smaller number = faster $Gui = GUICreate("Test", 370, 200) ;main GUI $checkbox = GUICtrlCreateCheckbox("Disable main window when child is open", 5, 5, 250) GUICtrlSetState(-1, $GUI_CHECKED) $button1 = GUICtrlCreateButton("Child_1", 5, 160, 100, 30) $button2 = GUICtrlCreateButton("Child_2", 110, 30, 250, 20) $bb = GUICtrlCreateTab(130, 80, 200, 100) $lol = GUICtrlCreateTabItem("Random control") WinSetTrans($Gui, "", 255) ;if it's not set to 255, then sliding out has visual bugs GUISetState(@SW_SHOW, $Gui) $ParentPosArr = WinGetPos($Gui) $ChildGui = GuiCreate("Child test", 100, $main_height, $ParentPosArr[0]+$ParentPosArr[2], $ParentPosArr[1]+5,$WS_POPUP, $WS_EX_MDICHILD, $Gui) $childpos = WinGetPos($ChildGui) $label1 = GUICtrlCreateButton("Test button 1", $childpos[2]/2-45, 5, 90) GUICtrlSetResizing (-1, $GUI_DOCKWIDTH+$GUI_DOCKHCENTER) ;button will be in center, and will not change width in case of window increasement (like when u press button2) $label2 = GUICtrlCreateButton("Close", $childpos[2]/2-45, 270, 90) GUICtrlSetResizing (-1, $GUI_DOCKWIDTH+$GUI_DOCKHCENTER) $label3 = GUICtrlCreateInput("Test", $childpos[2]/2-45, 80, 90) GUICtrlCreateGraphic(0, 0, $childpos[2], $childpos[3], 0x07) ;gray line on the edge of the pop up window GUISetState(@SW_HIDE, $ChildGui) $child2 = GuiCreate("Child test", 100, $main_height, $ParentPosArr[0]+$ParentPosArr[2], $ParentPosArr[1]+5,$WS_POPUP, $WS_EX_MDICHILD, $Gui) ;transparent window to lock main window when child is opened GUISetBkColor(0, $child2) WinSetTrans($child2, "", 100) GUISetState(@SW_HIDE, $child2) GUIRegisterMsg(0x0231,"WM_ENTERSIZEMOVE") GUIRegisterMsg(0x0232, "WM_EXITSIZEMOVE") Func WM_ENTERSIZEMOVE($hWndGUI, $MsgID, $WParam, $LParam) WinSetTrans($ChildGui,"",254) EndFunc Func WM_EXITSIZEMOVE($hWndGUI, $MsgID, $WParam, $LParam) WinSetTrans($ChildGui,"",255) EndFunc While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $button1 _show_child_window($button1, $slide_speed) ;slide in pop-up window ($button1 = button's handle) Case $button2 _show_child_window($button2, $slide_speed) case $label2 _slide_out($ChildGui, $slide_speed) EndSwitch WEnd Func _show_child_window($button_handle, $Speed) if WinExists($ChildGui) then _slide_out($ChildGui, $Speed/2) ;2x faster if switching between button pop-ups endif _slide_in($ChildGui, $Speed, $button_handle) EndFunc func _slide_in($hwGui, $Speed, $hwCtrl) Local $position = ControlGetPos($Gui, "", $hwCtrl) Local $position2 = WinGetPos($Gui) Local $position2b = WinGetClientSize($Gui) Local $position3 = WinGetPos($hwGui) Local $light_border = ($position2[2]-$position2b[0])/2 Local $thick_border = ($position2[3]-$position2b[1])-$light_border WinMove($hwGui, "", $position2[0]+$position[0]+$light_border, $position2[1]+$position[1]+$position[3]+$thick_border, $position[2]);set the window exacly below button DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwGui, "int", $Speed, "long", 0x00040004) _WinAPI_RedrawWindow($hwGui) GUISetState(@SW_SHOW, $hwGui) if GUICtrlRead($checkbox) = $GUI_CHECKED Then WinMove($child2, "", $position2[0]+$light_border, $position2[1]+$thick_border, $position2b[0], $position2b[1]) WinSetTrans($child2, "", 0) GUISetState(@SW_DISABLE, $child2) GUISetState(@SW_SHOWNOACTIVATE, $child2) for $i = 1 to 100 Step 10 ;showing "lock window" in smooth transparency WinSetTrans($child2, "", $i) Sleep(1) Next EndIf EndFunc func _slide_out($hwGui, $Speed) if WinExists($child2) Then for $i = 100 to 1 Step -10 WinSetTrans($child2, "", $i) Sleep(1) Next GUISetState(@SW_HIDE, $child2) EndIf DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwGui, "int", $Speed, "long", 0x00050008) GUISetState(@SW_HIDE, $hwGui) EndFunc
×
×
  • Create New...