Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/19/2025 in all areas

  1. Thank you for the example. I've never experimented with child GUI before, so this is really quite neat. It's a very creative technique to cover up the line. I'm going to continue trying some ideas based on your example. One downside that I notice is that when you move the GUI around on the screen, it will occasionally show a flicker of the white line. I don't think that GuiCreate has any kind of double-buffer option to prevent flicker but I will try a few things to see. Thank you for your time as well. Yes, it looks like resize will definitely need some more code. There might be some differences depending on user systems' titlebar size (varying from resize and non-resize) and possibly some differences varying with DPI. I will see what I can do to measure those things.
    2 points
  2. ... ;~ GUISetState(@SW_SHOW) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~ $hGuiRect = GUICreate("", 300, 2, 0, -1, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor (0x202020) GUISetState(@SW_SHOW, $hGuiRect) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~ GUISetState(@SW_SHOW, $hGUI) ... ..to avoid the flashing on load Edit: It certainly needs more code: but, it could work. =/
    2 points
  3. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPITheme.au3> #include "GUIDarkMode_v0.02mod.au3" #include "ModernMenuRaw.au3" DllCall("User32.dll", "bool", "SetProcessDpiAwarenessContext", "HWND", "DPI_AWARENESS_CONTEXT" - 4) _SetMenuBkColor(0x202020) _SetMenuIconBkColor(0x202020) _SetMenuIconBkGrdColor(0x202020) _SetMenuSelectBkColor(0x202020) _SetMenuSelectRectColor(0x202020) _SetMenuSelectTextColor(0xFFFFFF) _SetMenuTextColor(0xFFFFFF) Example() Func Example() $hGUI = GUICreate("My GUI", 300, 200) ;Local $idFileMenu = GUICtrlCreateMenu("&File") Local $idFileMenu = _GUICtrlCreateODTopMenu("&File", $hGUI) GUICtrlCreateMenuItem("&Open", $idFileMenu) GUICtrlCreateMenuItem("&Save", $idFileMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idOptionsMenu = GUICtrlCreateMenu("O&ptions", $idFileMenu) GUICtrlCreateMenuItem("View", $idOptionsMenu) GUICtrlCreateMenuItem("", $idOptionsMenu) GUICtrlCreateMenuItem("Tools", $idOptionsMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idExitItem = GUICtrlCreateMenuItem("&Exit", $idFileMenu) ;Local $idHelpMenu = GUICtrlCreateMenu("&?") Local $idHelpMenu = _GUICtrlCreateODTopMenu("&?", $hGUI) Local $idAboutItem = GUICtrlCreateMenuItem("&About", $idHelpMenu) Local $idEndBtn = GUICtrlCreateButton("End", 110, 140, 70, 20) GuiDarkmodeApply($hGUI) GUISetState(@SW_SHOW) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~ $hGuiRect = GUICreate("", 300, 2, 0, -1, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor (0x202020) GUISetState(@SW_SHOW, $hGuiRect) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~ Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() Switch $idMsg Case $idExitItem, $idEndBtn, $GUI_EVENT_CLOSE ExitLoop Case $idAboutItem MsgBox($MB_SYSTEMMODAL, "About...", "Colored menu sample") EndSwitch WEnd EndFunc ;==>Example
    2 points
  4. That line needs to be redrawn even on restore from minimize state. Once you find out when an update is neccessary you draw the line again.
    1 point
  5. Not following your script completely. But here another way : #include <Array.au3> Local $hExplorer = WinGetHandle("[REGEXPCLASS:^(Cabinet|Explore)WClass$]") If Not $hExplorer Then Exit Local $oShell = ObjCreate("Shell.Application") For $oWindow In $oShell.Windows() If $oWindow.HWND = $hExplorer Then ExitLoop Next With $oWindow.Document.SelectedItems() If Not .count Then Exit MsgBox(0, "Empty", "Please select a file or folder") ConsoleWrite("Items selected " & .count & @CRLF) Local $aFile[.count] For $i = 0 To .count - 1 $aFile[$i] = .item($i).Path Next EndWith _ArrayDisplay($aFile) For $i = 0 to UBound($aFile) - 1 ; do the delete here Next
    1 point
×
×
  • Create New...