Syla Posted Wednesday at 01:32 PM Posted Wednesday at 01:32 PM Good morning everyone. I'm working on a project who will display pictures with _GDIPlus_GraphicsDrawImage on Windows Virtual Desktops. I'm blocked in the step where i create a GUI for every virtual desktop on Windows 11. I've found some solutions on different topics. The first is to hide the icon in the Taskbar. For this i use $WS_EX_TOOLWINDOW when i create the GUI. The problem is that it will be displayed on all Virtual Desktops. No way to have different Pictures on every desktop when i switch between them. The second is to use parent and child GUI. But it does not work as expected in my side. I cannot paint it, or it's really slow, and it continues to show a icon on the Taskbar. I'm trying to find some help, if someone has experience with it, it will be really nice to share your knowledge 🙂 expandcollapse popupFunc _GetMyDockFinderPic($iDesk) _GDIPlus_Startup() $aVDesk[$iDesk][1] = _ScreenCapture_CaptureWnd("", $hFinder) $aVDesk[$iDesk][2] = _ScreenCapture_CaptureWnd("", $hDock) _GDIPlus_Shutdown() EndFunc Func _FillDockAndFinderGUI($iDesk) Local $hBitmap, $hGraphic, $aDockFinder _GDIPlus_Startup() For $i = 1 To 2 If $i = 1 Then $aDockFinder = $aFinder Else $aDockFinder = $aDock EndIf $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($aVDesk[$iDesk][$i]) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($aVDesk[$iDesk][3]) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, $aDockFinder[0], $aDockFinder[1]) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hBitmap) _WinAPI_DeleteObject($aVDesk[$iDesk][$i]) Next _GDIPlus_Shutdown() EndFunc Func _CreateDockAndFinderGUI($iDesk) $aVDesk[$iDesk][3] = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUISetBkColor(0xabcdef) _WinAPI_SetLayeredWindowAttributes($aVDesk[$iDesk][3], 0xabcdef) GUISetState(@SW_HIDE, $aVDesk[$iDesk][3]) EndFunc
ahmet Posted Saturday at 06:19 PM Posted Saturday at 06:19 PM Hi, I have no experinece with virtaul desktops but it is advisable to post runnable code. That way somenone trying to help you has to do a lot less work.
Nine Posted Saturday at 07:06 PM Posted Saturday at 07:06 PM (edited) My understanding is that you cannot have a tool window displayed only on one virtual desktop, unless someone shows me otherwise... As for your other question, like @ahmet said, post some runnable code that shows the problem. Edited Saturday at 07:08 PM by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
KaFu Posted Sunday at 12:44 AM Posted Sunday at 12:44 AM He could check which desktop is active in a tight loop (or is there a notification mechanism for changes)? And then, depending on the desktop IDed, show or hide the window or change the style. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Syla Posted Sunday at 06:44 AM Author Posted Sunday at 06:44 AM Yes I read the registry to get the active desktop ! The window I use is showing itself during the switch animation between 2 desktops, the active one and the next one to display. After the animation I close the window and desktop appears as usual. the problem is when I open and close this window, the taskbar is flashing because of the icon that appears. It’s why I try to create a window without it !
argumentum Posted Sunday at 12:52 PM Posted Sunday at 12:52 PM 6 hours ago, Syla said: ...the problem is when I open and close this window, the taskbar is flashing because... ..just loaded Task View to get a clue of what you mean. But the code you posted don't run on my PC. So I don't know what you mean. But if you posted running code I could help you ?, maybe ? Spoiler Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
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