Leaderboard
Popular Content
Showing content with the highest reputation on 10/19/2025 in all areas
-
User Interface Builder Overview Use this tool to visually design Windows applications with a focus on Metro windows, standard windows, and Tool windows. This is for users who want a faster and simpler development tool. Drag-and-drop GUI creation, code generation, and easy control alignment tools. No more clicking through property sheets to set variable names, sizes, and the control’s text. Please replace "MetroUDF-Required\SSCtrlHover.au3" within the metro UDF files to see more meaningful messages in the console. The following line was inserted into the function. This prevents crashing on syntax and logical errors while Metro buttons are in use. Func _cHvr_Register($idCtrl, $fnHovOff = '', $fnHoverOn = '', $fnClick = '', $fnDblClk = '', $HoverData = 0,$ClickData = 0,$fnRightClick = '') If $BLOCK_HOVER_REGISTRATION Then Return Unfortunately, the following will have to added to your scripts if you already use Metro UDF and you replace "SSCtrlHover.au3". Global $BLOCK_HOVER_REGISTRATION = False #include "MetroGUI_UDF.au3" #include "MetroGUI_UDF_xpk.au3" #include "_GUIDisable.au3" ; For dim effects when msgbox is displayed Features Metro Controls for all window types WYSIWYG real-time preview Generates AutoIt GUI and message loop code Multiple control selection and manipulation Make additional selections with the CTRL key Accelerated control movements with the SHIFT key Change controls position with mouse or arrow keys Double click a control to precisely set its size and text Save/load GUI layouts and Control layouts to files Custom styles/themes and Controls using Metro Snap-to-guide, and toolbar alignment aids Drag down guides from the top and left sides of the Designer window Copy-n-paste between different window types Technical Details .Gui/.Ctrls file is a simple delimited text file Copy-n-paste is a similar file without the window specifications The application is meant to be portable, so it is one file The only Custom UDFs in use is Metro 5.1, and my Metro Expansion pack The script uses Label controls for everything. No GDI was used. Every control handle is saved in an array Maps are used in Metro and in future UDFs containing new controls You need Metro 5.1 UDF Limitations and known issues Resizing the Metro window with the mouse is flaky Changing control and window styles is not implemented Window size cannot be changed precisely Undo functionality might cause problems with code generation No Redo implemented Thank you BB19 and everyone that contributed to Metro UDF. MetroGUI_UDF_xpk.au3 SSCtrlHover.au3 UserInterfaceBuilder.au31 point
-
Bug: Menu and Controls stop working after SW_SHOW from another process
pixelsearch reacted to WildByDesign for a topic
I came across this issue in one of my projects and decided to recreate a smaller script to reproduce the issue and see if anyone knows how I can get around this issue. The main GUI script has the ability to hide to it's system tray icon Clicking on the tray icon will show the GUI again In this case, the menu items (Help > About) and controls still work I have a situation where I use another script to show the GUI again since it is normally hidden in the system tray. GUI is already hidden in system tray This second script runs to show the GUI GUI does show and everything appears visually correct In this case, the menu items (Help > About) and controls do NOT work Yet if I hide the GUI again during the same run, and show itself again from the tray icon, everything works again. Therefore, it only seems to happen when showing the GUI from another process. Script1: #NoTrayIcon #include <AutoItConstants.au3> #include <TrayConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> Global $hGUI Opt("TrayMenuMode", 3) Opt("TrayAutoPause", 0) Opt("TrayOnEventMode", 1) TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, 'idGUI') TraySetClick(16) $idGUI = TrayCreateItem("Show GUI") TrayItemSetOnEvent($idGUI, "idGUI") TrayCreateItem("") $idExit = TrayCreateItem('Exit') TrayItemSetOnEvent($idExit, "_Exit") TraySetIcon(@AutoItExe, 1) TraySetToolTip("Show GUI") Example() Func Example() Local $sDefaultstatus = "Ready" $hGUI = GUICreate("My GUI menu", 300, 200) Local $idMnu_File = GUICtrlCreateMenu("&File") Local $idMnu_Help = GUICtrlCreateMenu("Help") Local $idMni_Info = GUICtrlCreateMenuItem("About", $idMnu_Help) Local $idMnu_View = GUICtrlCreateMenu("View", -1, 1) Local $idBtn_Hide = GUICtrlCreateButton("Hide GUI", 50, 130, 70, 20) GUICtrlSetState(-1, $GUI_FOCUS) Local $idBtn_Cancel = GUICtrlCreateButton("Exit", 180, 130, 70, 20) Local $idLbl_Status = GUICtrlCreateLabel($sDefaultstatus, 0, 165, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN)) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $idBtn_Hide GUISetState(@SW_HIDE, $hGUI) Case $idBtn_Cancel, $GUI_EVENT_CLOSE ExitLoop Case $idMni_Info MsgBox($MB_SYSTEMMODAL, "Info", "Only a test...") EndSwitch WEnd GUIDelete() EndFunc ;==>Example Func _Exit() Exit EndFunc Func idGUI() ; get GUI window state Local $iState = WinGetState($hGUI) If $iState <> $WIN_STATE_VISIBLE Then GUISetState(@SW_SHOW, $hGUI) EndFunc Script2: #include <WinAPISysWin.au3> ; show and activate the GUI window $hWnd = WinGetHandle("My GUI menu") _WinAPI_ShowWindow($hWnd, @SW_SHOW) _WinAPI_SetForegroundWindow($hWnd) By the way, I have tried all of the other functions such as WinActivate and various WinAPI to show and give focus to the GUI window. They all still work to show the GUI but also still have controls and menu items that fail. Does anyone know why this issue occurs or what I can do to fix it? Thank you for your time.1 point -
User Interface Builder - GUI Designer
WildByDesign reacted to pat4005 for a topic
0xC0FFEE, this is awesome and super useful! I'm so fed up by manual gui control positioning and this great project is the solution. Keep it up, I am excited to see more. Will you accept any improvements or advices? It's been so long I am using MetroGUI_UDF, that I've also did something to extend its functionality. For example, _Metro_CreateInput and _Metro_CreateComboBox. I could provide some code to help in development of a couple useful control elements. metro.mp41 point -
myLogin - 🛡️ Secure lock screen Windows 🖥️
argumentum reacted to mlibre2 for a topic
New release available v4.0 🤖1 point -
Bug: Menu and Controls stop working after SW_SHOW from another process
argumentum reacted to WildByDesign for a topic
You literally just saved the rest of my weekend, Sir. Thank you! 🍷 So the trick was to essentially use WinSetState instead of GUISetState. I really needed this to work, one way or another. I feel very lucky for the fact that there was a simple workaround for this issue and thankful that you were able to help me solve this issue. Now I can relax.1 point -
SampleControls.au3 in Dark Mode
UEZ reacted to WildByDesign for a topic
This no longer works on the latest stable channel builds of Windows 11. In particular, builds 24H2 (26100.6899) and 25H2 (26200.6899), it fails to theme the progress control at all. (I just get an empty white box) On these most recent stable channel builds of Windows 11, it now has to be: Case "msctls_progress32" _WinAPI_SetWindowTheme($hCtrl, "DarkMode_CopyEngine", 0) With your example for SampleControls and also the DarkMode UDF, we are going to have to start comparing the builds with macro @OSBuild to determine which theme class to use. These newer DarkMode_CopyEngine* and DarkMode_DarkTheme* theme classes seem to be improved significantly over the former DarkMode_Explorer* classes. A lot of visual issues are fixed now as well. So for any users who are on Windows 11 with the latest windows updates, using DarkMode_DarkTheme* is by far the better option over DarkMode_Explorer* classes. MS even added nice dark theme for statusbar as well in DarkMode_DarkTheme* class. ListViews are improved too. I'm not sure if we should update the older DarkMode UDF or start a new one. In my opinion, of the older DarkMode UDF versions, the GUIDarkMode_v0.02mod.au3 from the fabulous @argumentum is the most functional and best option to use as a base.1 point