Jump to content
BBs19

MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.

Recommended Posts

On 5/7/2014 at 1:36 AM, BBs19 said:

Features:

  • Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu)
  • True borderless, resizeable GUI with full support for aerosnap etc.
  • Many color schemes/themes included. See MetroThemes.au3 for more details.
  • 3 type of Windows 8/10 style buttons.
  • Modern checkboxes, radios, toggles and progressbar.
  • All buttons, checkboxes etc. have hover effects!
  • Windows 10 style modern MsgBox.
  • Windows 10/Android style menu that slides in from left.
  • Windows 10 style right click menu

 

Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF

please add support RTL

Share this post


Link to post
Share on other sites

Thanks for this udf.

Could you add an indeterminate state for checkbox ?

I tried, but my gdi experience isn't very good.

 

I played a little to see if i could make undeterminate checkbox state, and change size of some components :

 

image.png.ea974cc708863d433dee35c20d417932.png

 

Thanks again for this udf.

Edited by kaz

Share this post


Link to post
Share on other sites
27 minutes ago, Miliardsto said:

gonna be any update ?

Is there something wrong with it as it is now?


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 Gude
How 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

Share this post


Link to post
Share on other sites
On 6/28/2019 at 3:24 PM, Miliardsto said:

you answer your piece of reality

I don't use this UDF and never have, so I asked because the answer would be more informative as to what you need an update for rather than attacking the question.


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 Gude
How 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

Share this post


Link to post
Share on other sites

@rcn3t0 you have already opened your own topic for this, and that's fine. Let's not spam other people's threads to promote your script please.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
22 hours ago, JLogan3o13 said:

@rcn3t0 you have already opened your own topic for this, and that's fine. Let's not spam other people's threads to promote your script please.

You're right, I'm sorry

Share this post


Link to post
Share on other sites
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /rm /pe

#Au3Stripper_Ignore_Funcs=_iHoverOn,_iHoverOff,_iFullscreenToggleBtn,_cHvr_CSCP_X64,_cHvr_CSCP_X86,_iControlDelete
#AutoIt3Wrapper_Res_HiDpi=y

#NoTrayIcon
#include "libs\MetroGUI-UDF\MetroGUI_UDF.au3"
#include "libs\MetroGUI-UDF\_GUIDisable.au3"
#include <GUIConstants.au3>
#include <AutoItConstants.au3>

_Metro_EnableHighDPIScaling() 

_SetTheme("DarkTeal") 

$Form1 = _Metro_CreateGUI("ffff", 300, 200)

$Control_Buttons = _Metro_AddControlButtons(True, False, True, False, False)

$GUI_CLOSE_BUTTON = $Control_Buttons[0]
$GUI_MAXIMIZE_BUTTON = $Control_Buttons[1]
$GUI_RESTORE_BUTTON = $Control_Buttons[2]
$GUI_MINIMIZE_BUTTON = $Control_Buttons[3]
$GUI_FULLSCREEN_BUTTON = $Control_Buttons[4]
$GUI_FSRestore_BUTTON = $Control_Buttons[5]
$GUI_MENU_BUTTON = $Control_Buttons[6]

$Button1 = _Metro_CreateButtonEx2("Download !", 180, 80, 100, 40)

$Radio1 = _Metro_CreateRadio("1", "Offf", 16, 50, 150, 25)
$Radio2 = _Metro_CreateRadio("1", "Afff", 16, 80, 150, 25)
$Radio3 = _Metro_CreateRadio("1", "fffod", 16, 110, 150, 25)
_Metro_RadioCheck("1", $Radio1)
GUISetState(@SW_SHOW)

 

I tried to create a no resizable gui but still resizable :( 

Share this post


Link to post
Share on other sites
10 minutes ago, Blitzkid said:

First of all great UDF!

 

Is there a way, to use the $WS_EX_MDICHILD style on a childgui?

Something like this:

$Form1 = _Metro_CreateGUI("Destiny Raidbuddy", 1010, 710, -1, -1, True)
GUISetState(@SW_SHOW)

$form1_child = _Metro_CreateGUI("", 750, 600, -1, -1, True, $Form1)
GUISetStyle($WS_CHILD, $WS_EX_MDICHILD, $form1_child)
GUISetState(@SW_SHOW)

 

I have solved my problem by putting _GUIDisable under the childgui. now it moves together with the maingui

;Create resizable Metro GUI
$Form1 = _Metro_CreateGUI("Raidbuddy", 1010, 710, -1, -1, True)
GUISetState(@SW_SHOW)

FullscreenBtn = True, MenuBtn = True
$form1_child = _Metro_CreateGUI("", 750, 600, -1, -1, False, $Form1)
GUISetStyle($WS_CHILD, $WS_EX_MDICHILD, $form1_child)
GUISetState(@SW_SHOW)
_GUIDisable($Form1, 0, 30)
_GUIDisable($Form1)

 

Share this post


Link to post
Share on other sites
On 11/9/2018 at 9:44 AM, islandspapand said:

I will give it a try and re download the udf and create a new WinPE10 x64(1803) from scratch and se if it help.

the udf works fine in windows  it only in WinPE this ocurres. 

Will give feedback when I have tried it later tonight

Hello,

First off great UDF @BBs19 !! I only wish I found it years ago. 
 
I know it has been about 1 year since the quoted post, but I was wondering if anyone was able to resolve the issue with the MetroUDF controls in WinPE. I have tried different versions of the Windows 10 (1703, 1803, and 1903) and 8.1 ADK's , tried downloading the UDF again (as someone else suggested), used a clean install of AutoIT, compiled the example app and it too has the issue.   

For the _Metro_CreateOnOffToggle control it doesn't seem to like passing font parameters. 

Working - $USB_ISO_Toggle = _Metro_CreateOnOffToggle("ISO", "USB Flash", 335, 115, 155, 30)
Not working - $USB_ISO_Toggle = _Metro_CreateOnOffToggle("ISO", "USB Flash", 335, 115, 155, 30, 0xD7D7D7, 0x000000, "Arial", 12)

Any insight to why this is happening would be greatly appreciated. Thanks in advance!!

In Windows
image.png.383d6ed697a364d5c48b3d134de8c946.png

In WinPE

image.png.655d07221902ebd5ec43aed18c2a28ec.png  


****UPDATE******
So of course after posting my issue I found the solution

WinPE has very few fonts installed by default (Segoe UI, Sylfaen, Tahoma) so if you use any of these 3 fonts you will be good  :thumbsup: 

Edited by cgmiapapi

Share this post


Link to post
Share on other sites

Hello, 

to avoid error messages from Au3Stripper, some changes are needed. 

Add an auxiliary function to the SSCtrlHover.au3 

Func _cHvr_CSCP()
    If @AutoItX64 Then
        Return _cHvr_CSCP_X64()
    Else
        Return _cHvr_CSCP_X86()
    EndIf
EndFunc

and replace 

Call(@AutoItX64 ? '_cHvr_CSCP_X64' : '_cHvr_CSCP_X86')

with 

Call('_cHvr_CSCP')

in two places. 

The function _cHvr_CallFunc  must be completely rewritten. Here is the code:

Func _cHvr_CallFunc(ByRef $aCtrlData, $iCallType)
    Switch $aCtrlData[$iCallType]
        Case '_iHoverOn'
            Call('_iHoverOn', $aCtrlData[1], $aCtrlData[$iCallType + 1])
        Case '_iHoverOff'
            Call('_iHoverOff', $aCtrlData[1], $aCtrlData[$iCallType + 1])
        Case '_iFullscreenToggleBtn'
            Call('_iFullscreenToggleBtn', $aCtrlData[1], $aCtrlData[$iCallType + 1])
    EndSwitch
EndFunc

The line "#Au3Stripper_Ignore_Funcs=..." is no longer needed.

Important: if you add new functions as arguments of the function _cHvr_Register, then you also need to add them to the function _cHvr_CallFunc. 

 

Edited by kovlad

Share this post


Link to post
Share on other sites

Hi all

I'd like to say the work is awesome,let me easily to use and create the style what I want.

Here is a question.

=============================================================================================================================

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /rm /pe
#Au3Stripper_Ignore_Funcs=_iHoverOn,_iHoverOff,_iMinBtn,_iMaxBtn,_iCloseBtn,_iRestoreBtn,_iFullscreenToggleBtn,_cHvr_CSCP_X64,_cHvr_CSCP_X86,_iControlDelete
#AutoIt3Wrapper_Res_HiDpi=y

#NoTrayIcon
#include "MetroGUI-UDF\MetroGUI_UDF.au3"
#include "MetroGUI-UDF\_GUIDisable.au3" ; For dim effects when msgbox is displayed
#include <GUIConstants.au3>


Opt("GUIOnEventMode", 1)
_Metro_EnableHighDPIScaling()
_SetTheme("DarkTealV2")
$Form1 = _Metro_CreateGUI("", 530, 350, -1, -1, True)
$Control_Buttons = _Metro_AddControlButtons(False, False, False, False, False) ;CloseBtn = True, MaximizeBtn = True, MinimizeBtn = True, FullscreenBtn = True, MenuBtn = True


_Metro_MsgBox(0, "Metro MsgBox Example", "Ready?", 200, 14, "", 0)

================================================================================================================================

It does show the Msgbox by Metro type but the "OK" button doesn't work at all. It means I cann't click the ok button to leave the msgbox.

I have no idea what's going on.

Would you guys  give some advice ?

 

Thanks & regards

Share this post


Link to post
Share on other sites
9 hours ago, aaronhunter said:

Hi all

I'd like to say the work is awesome,let me easily to use and create the style what I want.

Here is a question.

=============================================================================================================================

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /rm /pe
#Au3Stripper_Ignore_Funcs=_iHoverOn,_iHoverOff,_iMinBtn,_iMaxBtn,_iCloseBtn,_iRestoreBtn,_iFullscreenToggleBtn,_cHvr_CSCP_X64,_cHvr_CSCP_X86,_iControlDelete
#AutoIt3Wrapper_Res_HiDpi=y

#NoTrayIcon
#include "MetroGUI-UDF\MetroGUI_UDF.au3"
#include "MetroGUI-UDF\_GUIDisable.au3" ; For dim effects when msgbox is displayed
#include <GUIConstants.au3>


Opt("GUIOnEventMode", 1)
_Metro_EnableHighDPIScaling()
_SetTheme("DarkTealV2")
$Form1 = _Metro_CreateGUI("", 530, 350, -1, -1, True)
$Control_Buttons = _Metro_AddControlButtons(False, False, False, False, False) ;CloseBtn = True, MaximizeBtn = True, MinimizeBtn = True, FullscreenBtn = True, MenuBtn = True


_Metro_MsgBox(0, "Metro MsgBox Example", "Ready?", 200, 14, "", 0)

================================================================================================================================

It does show the Msgbox by Metro type but the "OK" button doesn't work at all. It means I cann't click the ok button to leave the msgbox.

I have no idea what's going on.

Would you guys  give some advice ?

 

Thanks & regards

Hi, try setting the Opt("GUIOnEventMode", 1) before you Include the MetroGUI_UDF.au3.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Se7enstars
      Hi my dear Friends! Today I create Multi GUI (Metro style) with some future.
      Watch tutorial: >> 3:30 sec <<
      Download Source Code: >>snip <<
      Please Rate my work (Subscribe to me on youtube for more Design)
      Thanks!

    • By Se7enstars
      Hi dear my Friend, I prepair for you next Signup UI (odnoklassniki.ru sign up) with some amazing function in AutoIt
      Watch full tutorial: Link YouTube << Please subscribe to our channel, and at future I 'll create for you super modern interfaces in AutoIt code
      Download Source Code: <snip>
      Rate my work pls!
       

      Autoit UI 7 - SignUp UI.zip
    • By Se7enstars
      New Modern Design UI in AutoIt in 118 line
      Please watch & like in Youtube: Link
      Full Source Code free: Link
       

    • By kingjacob90
      Hi
      So I am trying to click the green button, this button is not always in the same place. So fare I am trying to click it by finding the color but there is also something else with the same color on the screen (circled in yellow) that is causing issues. Is there a way to use the Title and Class of the window (can't be just the window as there are more than one with the same name).
      How does AutoIt Info get this information?

    • By Skysnake
      Hi guys
      AutoIt content - Microsoft thinks any AutoIt content is unwanted.
      What it does is simply delete any EXEs. No option of do you want to continue...
      The March 2020 updated has substantially changed the Defender Virus Protection logic and layout.
      I found three pages relevant to the help, and lots of outdated content. Is there a quick and easy way to set folder exclusions? Any help is appreciated and simply using google is not good enough, as this is a new problem, caused by the update.
      Any ideas please?
      ____________________________
      ANSWER
      Found it.
      Accessing the menu through the Control Panel does not work
      Click the Defender shield in the icon tray.
      Scroll down to Virus & threat protection settings click Manage Settings Scroll down to Exclusions click Add or remove exclusions then click the + for Add an exclusion, and select File / Folder / File type / Process 
      Select Folder and browse to select. 😥
       
      Skysnake
×
×
  • Create New...