Omnius Posted January 15, 2022 Share Posted January 15, 2022 I wasn't able to get Aida64 to do what I wanted as far as handling when my monitors get switched off or my KVM is activated, so I wrote a program that runs in the Windows tray. The program allows you to select a monitor and it will keep the sensor panel maximized on that monitor. It responds to any changes in monitor profile or monitor resolution and will resize it. It also has an option for resetting the window on a timed basis, if there is some other application causing trouble. Before I release it I'd like to get a few more people testing the application for me. I will be pushing the source up to GitHub as soon as testing is complete (mine and hopefully others). Let me know if you are interested in beta testing the application for me. I don't have an installer created yet, so I can just send you a zip file with the application and initial configuration file. Any suggestions as to further functionality would also be welcome. Here are some screen shots of the settings dialog: 1 Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 22, 2022 Author Share Posted January 22, 2022 Well, I didn't get anybody interested, but I think I have MVP. I may think of some other things to do with it, but I've published it here: https://github.com/42degrees/ForceSensorPanelToMonitor 1 Quote Link to comment Share on other sites More sharing options...
Alfredo Carraturo Posted January 22, 2022 Share Posted January 22, 2022 On 1/15/2022 at 6:38 AM, Omnius said: Non sono stato in grado di convincere Aida64 a fare ciò che volevo per quanto riguarda la gestione quando i miei monitor vengono spenti o il mio KVM è attivato, quindi ho scritto un programma che viene eseguito nella barra delle applicazioni di Windows. Il programma consente di selezionare un monitor e manterrà il pannello del sensore ingrandito su quel monitor. Risponde a qualsiasi cambiamento nel profilo del monitor o nella risoluzione del monitor e lo ridimensionerà. Ha anche un'opzione per ripristinare la finestra a tempo, se c'è qualche altra applicazione che causa problemi. Prima di rilasciarlo, vorrei che altre persone testassero l'applicazione per me. Invierò il sorgente su GitHub non appena il test sarà completo (il mio e, si spera, altri). Fammi sapere se sei interessato a testare la versione beta dell'applicazione per me. Non ho ancora creato un programma di installazione, quindi posso semplicemente inviarti un file zip con l'applicazione e il file di configurazione iniziale. Eventuali suggerimenti su ulteriori funzionalità sarebbero anche i benvenuti. Ecco alcune schermate della finestra di dialogo delle impostazioni: I have this problem, very interesting what you did, I try it now Quote Link to comment Share on other sites More sharing options...
Alfredo Carraturo Posted January 22, 2022 Share Posted January 22, 2022 the link doesn't work Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 23, 2022 Author Share Posted January 23, 2022 4 hours ago, Alfredo Carraturo said: the link doesn't work I apologize, I forgot to mark the repository as public. It should work now. Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 23, 2022 Author Share Posted January 23, 2022 5 hours ago, Alfredo Carraturo said: I have this problem, very interesting what you did, I try it now Alfredo, I sent you a link to the zip file using private messaging on this site. Unpack it to a directory and run it. Please let me know if you have any issues with it. Omnius Quote Link to comment Share on other sites More sharing options...
Eric Ho Posted January 23, 2022 Share Posted January 23, 2022 Can you send me the link to a zip file as well? Thanks. Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 23, 2022 Author Share Posted January 23, 2022 11 hours ago, Eric Ho said: Can you send me the link to a zip file as well? Thanks. Eric, I sent you a private message on this site. Omnius Quote Link to comment Share on other sites More sharing options...
Eric Ho Posted January 24, 2022 Share Posted January 24, 2022 2 hours ago, Omnius said: Eric, I sent you a private message on this site. Omnius Thanks. It is working. Appreciate your help and work. Best regards, Eric 1 Quote Link to comment Share on other sites More sharing options...
SpeedyV Posted January 24, 2022 Share Posted January 24, 2022 I would like to try this too. Can I just download all of the files from Github? If not, please PM me a link and thank you for offering this to the community. Also, is this specific to AIDA64? I am using Aquasuite to drive 2 internal displays. One is 1920x480 and the other is 1024x600. I have both panels set up in the same Aquasuite Overview page (similar to ADIA sensor panel). It works but if I change the display layout it tends to scramble things. I also am fighting with some program windows jumping to one of the internal displays. It's a pain to get the cursor on the top of the window to drag it back onto one of the main displays. I am wondering if this program could help with that as well. Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 25, 2022 Author Share Posted January 25, 2022 8 hours ago, SpeedyV said: I would like to try this too. Can I just download all of the files from Github? If not, please PM me a link and thank you for offering this to the community. Also, is this specific to AIDA64? I am using Aquasuite to drive 2 internal displays. One is 1920x480 and the other is 1024x600. I have both panels set up in the same Aquasuite Overview page (similar to ADIA sensor panel). It works but if I change the display layout it tends to scramble things. I also am fighting with some program windows jumping to one of the internal displays. It's a pain to get the cursor on the top of the window to drag it back onto one of the main displays. I am wondering if this program could help with that as well. Speedy, If you have Visual Studio and are willing to build it, then pull the repo from Github and go for it (it's fully up to date with what I've been sharing with others). If you'd rather I'm happy to send you a zip of the built application. The program should work to keep any window glued to any monitor as long as the window has a unique window class. This is common but is not required. If you don't know the window class of the window in question, you can find out using a number of tools. I found this thread talking about how to get the class of any window: https://stackoverflow.com/questions/1811019/i-want-spy-but-i-dont-have-visual-studio I used Sysinternals Process Explorer, but you have to know a lot more about what you are doing. Note that I don't endorse any of the applications linked from that Stack Overflow thread. I didn't consider having it work with multiple windows and displays, currently it only works with one (and it doesn't allow you to run it multiple times). It wouldn't be very hard to set it up to handle multiple displays, but I'll have to get more complicated on the program configuration. However, the bigger problem might be that the two displays from the same program likely have the same window class and that's how I'm identifying which window to target. I'll have to pull Aquasuite and see what it does (first I've heard of it). It might have to get a bit smarter to allow multiple windows. I don't think Aida64 supports multiple sensor panels. As to the rogue program problem, I could probably detect if another program has decided it wants to be on that monitor and move it to the primary monitor. Depending on how much the application wants to be on that window, it is possible to get in an endless loop moving windows around, so that could be interesting. It would be nice if you could mark a monitor in Windows as being off-limit to all but a white list of programs. Let me give this some thought... Let me know if you want the zip. Omnius Quote Link to comment Share on other sites More sharing options...
Omnius Posted January 26, 2022 Author Share Posted January 26, 2022 OK, I've upgraded the application. Note the new checkbox on the bottom. If you select that, then it will move any applications off the sensor panel. It will move them to the monitor that (according to the current monitor profile) is closest to the sensor panel. So, if you want the applications to move to a specific monitor, make sure the sensor panel is closest to that monitor in the profile. The program will keep the sensor panel glued to the monitor no matter where you move it in the profile. If you don't set a refresh rate it will only check for rogue applications when it sees a change to the monitor profile, which probably isn't often enough for that feature to be useful. The work it does is very light-weight so setting it to 10 seconds isn't going to be something you will notice on your computer (if you do, let me know). The source is updated in the repo and the zip file that I gave to the beta testers has been updated on the download server, so please download the zip again if you want to try this new feature. Enjoy, Omnius Quote Link to comment Share on other sites More sharing options...
Omnius Posted February 11, 2022 Author Share Posted February 11, 2022 I've upgraded the application again, it now also restores the sensor panel when the user logs in or unlocks Windows (if the window configuration changed while the user wasn't logged in the application wasn't able to catch it and fix the window until the user logged back in). You can get it from the original location I sent you. Anyone else who would like to try the application, please reply here and I'll contact you directly. Omnius 1 Quote Link to comment Share on other sites More sharing options...
David Floyd Tye Posted February 16, 2022 Share Posted February 16, 2022 Well, you can count me in on trying it. I have sat here for a few hrs, trying to get that sensor panel to start on the right monitor. keeps wanting to start on my 4k at 0,0 position. For the life of me, I had it starting on the right monitor before, I have no idea how I did it. Might have been a fluke too. I may be an exception to try it. I got my sensor panel split between two monitors. 8.8in and a small 5in screen. Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 2, 2022 Author Share Posted March 2, 2022 On 2/15/2022 at 9:46 PM, David Floyd Tye said: Well, you can count me in on trying it. I have sat here for a few hrs, trying to get that sensor panel to start on the right monitor. keeps wanting to start on my 4k at 0,0 position. For the life of me, I had it starting on the right monitor before, I have no idea how I did it. Might have been a fluke too. I may be an exception to try it. I got my sensor panel split between two monitors. 8.8in and a small 5in screen. David, If I understand you, you have created a sensor panel that spans multiple monitors? My tool may not help you then because it is definitely assuming that the panel is on a single monitor. I wonder if you can rename and run Aida64 twice (seems like I read a forum message somewhere saying that there is a way to run it more than once). My program cannot be run more than once, at this point. Omnius Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 2, 2022 Author Share Posted March 2, 2022 On 2/15/2022 at 9:46 PM, David Floyd Tye said: Well, you can count me in on trying it. I have sat here for a few hrs, trying to get that sensor panel to start on the right monitor. keeps wanting to start on my 4k at 0,0 position. For the life of me, I had it starting on the right monitor before, I have no idea how I did it. Might have been a fluke too. I may be an exception to try it. I got my sensor panel split between two monitors. 8.8in and a small 5in screen. Sorry I was so late responding, I never got an e-mail saying that you wrote, which is strange. Thinking about your situation, I might be able to provide an offset in the program, to that it will force the panel to line up with a specific pixel in the panel matched with the upper left corner of the monitor. I'll play with that. If you could send me a screen shot or an actual photo of your monitor setup showing what you are trying to do, that might help. Omnius Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 2, 2022 Author Share Posted March 2, 2022 A general update. The program has one outstanding bug that I'm working on and that is that it doesn't exit properly when windows is shutting down or rebooting. It blocks it by putting up an "Are you sure?" dialog. Hopefully I'll be able to get to updating it to fix this bug soon. I've been a bit distracted since I'm building a new computer. Anyone else have any bugs or suggestions to report? Quote Link to comment Share on other sites More sharing options...
SpeedyV Posted March 3, 2022 Share Posted March 3, 2022 On 1/24/2022 at 8:57 PM, Omnius said: Speedy, If you have Visual Studio and are willing to build it, then pull the repo from Github and go for it (it's fully up to date with what I've been sharing with others). If you'd rather I'm happy to send you a zip of the built application. The program should work to keep any window glued to any monitor as long as the window has a unique window class. This is common but is not required. If you don't know the window class of the window in question, you can find out using a number of tools. I found this thread talking about how to get the class of any window: https://stackoverflow.com/questions/1811019/i-want-spy-but-i-dont-have-visual-studio I used Sysinternals Process Explorer, but you have to know a lot more about what you are doing. Note that I don't endorse any of the applications linked from that Stack Overflow thread. I didn't consider having it work with multiple windows and displays, currently it only works with one (and it doesn't allow you to run it multiple times). It wouldn't be very hard to set it up to handle multiple displays, but I'll have to get more complicated on the program configuration. However, the bigger problem might be that the two displays from the same program likely have the same window class and that's how I'm identifying which window to target. I'll have to pull Aquasuite and see what it does (first I've heard of it). It might have to get a bit smarter to allow multiple windows. I don't think Aida64 supports multiple sensor panels. As to the rogue program problem, I could probably detect if another program has decided it wants to be on that monitor and move it to the primary monitor. Depending on how much the application wants to be on that window, it is possible to get in an endless loop moving windows around, so that could be interesting. It would be nice if you could mark a monitor in Windows as being off-limit to all but a white list of programs. Let me give this some thought... Let me know if you want the zip. Omnius Hi. Sorry I just saw this post (never got a notification). I am still interesting in checking this out so please do send me the zip. I guess you can send it through a PM? If not let me know and I will provide an email address. Thanks! On 1/24/2022 at 8:57 PM, Omnius said: Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 18, 2022 Author Share Posted March 18, 2022 Update: If you have two or more video cards then you might see some strange behavior. It turns out that I was making the assumption that two Windows API calls will return the monitors in the same order, but this appears to only be true if there is a single video card. If you have two or more (including one external and one integrated) then you may get the weird effect that you pick monitor A and it maps the sensor panel to monitor D, but forces all applications to vacate monitor A. I'm still working on how to join those two API calls properly, but if you see this effect, please do let me know so that I can validate the above assumption and please have patience while I figure out the right fix. Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 26, 2022 Author Share Posted March 26, 2022 OK, Beta testers, I've updated the program to properly handle multiple video cards as well as mirrored monitors. Please download the zip file again from the location previously shared and overwrite your previous copy. Please do let me know if you had any issues previously that this release fixes, or if you have any new problems with this version. Thanks for helping! For those wondering what the problem was and how I resolved it, read on. There are two completely separate ways to iterate through monitors on the system in C#. The one that is easy is to use System.Windows.Forms.Screen.AllScreens. This is a dead simple interface that probably is more than enough for many programs, but not when we are trying to watch screen configurations dynamically. For example, there is nothing in this library about the interfaces, or about monitors that are mirrored. This list does provide some useful abstractions though, that saved me some time, so I really wanted to use this instead of doing the work again. The second way is to call QueryDisplayConfig which provides detailed information about the entire monitor configuration. It separates out the "source," which is a logical monitor that programs write to, from the "target," which is a physical screen. The same source can be directed at multiple targets (for example in the case of one monitor mirrored with another). This has a lot of esoteric information about the system (like whether a monitor is rotated) that we don't care about, and unfortunately there is no key information that is shared with the Screen library above (the key is called the "AdapterId" and has two parts, the LUID (which corresponds to the actual video card to which the monitor is attached) and the ID (a unique number relative to the LUID). You need both of these to uniquely identify an actual monitor. Unfortunately, neither the LUID or the ID is present in the Screen library (they abstracted it away, unfortunately). So, to combine these you are left with having to find the target using heuristics (the device size and offset). Fortunately, aside from mirroring, monitors cannot logically overlap in Windows, so it is possible to identify these exactly (see the code on GitHub to see how I combined these into a single overall structure). Another problem was that I wasn't properly refreshing the monitor information when the monitor profile changed (in fact, I wasn't detecting all the ways the monitor profile could change). I think I'm now doing that, though I may be refreshing it more often than necessary. Fortunately, the actual number of monitors can't be that big a number, so the refresh is very quick, almost unnoticeable on a reasonable computer. Do let me know if you notice delays in updating the UI. As to mirroring, I wrote some heuristics there as well, trying to guess what monitor to choose when switching from mirrored monitors to non-mirrored monitors. I needed this myself since I my sensor panel is not actually visible to me when I'm sitting at my desk, so to work on the sensor panel the easy thing is to mirror the sensor panel to one of my other monitors, fix it, then break the monitors back apart. Quote Link to comment Share on other sites More sharing options...
trananhvn Posted March 27, 2022 Share Posted March 27, 2022 Help me! How to display gif in sensopanel? Quote Link to comment Share on other sites More sharing options...
Omnius Posted March 28, 2022 Author Share Posted March 28, 2022 On 3/27/2022 at 4:47 AM, trananhvn said: Help me! How to display gif in sensopanel? There is probably a better place to post your question than as a reply to this thread. However, if you're talking about adding an animated GIF to the sensor panel I've seen people discussing that topic and Aida64 has said they don't plan to support animated GIFs. The explanation was something about it interfering with the sensor panel update speed (which I don't completely buy since having a separate thread just for animating gifs wouldn't be rocket science). Here is a discussion about animated GIFs . 2 Quote Link to comment Share on other sites More sharing options...
trananhvn Posted March 31, 2022 Share Posted March 31, 2022 Thank! 1 Quote Link to comment Share on other sites More sharing options...
WanaGo Posted April 7, 2022 Share Posted April 7, 2022 Email sent - I am keen to give this a try if possible. Thanks Quote Link to comment Share on other sites More sharing options...
supes Posted April 7, 2022 Share Posted April 7, 2022 On 3/2/2022 at 2:57 PM, Omnius said: A general update. The program has one outstanding bug that I'm working on and that is that it doesn't exit properly when windows is shutting down or rebooting. It blocks it by putting up an "Are you sure?" dialog. Hopefully I'll be able to get to updating it to fix this bug soon. I've been a bit distracted since I'm building a new computer. Anyone else have any bugs or suggestions to report? could i please get a link to to you program? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.