Desktop Size?
BlitzMax Forums/MaxGUI Module/Desktop Size?
| ||
<code> Local window:TGadget Local DTop:TGadget = Desktop:TGadget() Local dtw:Int = GadgetWidth(DTop) Local dth:Int = GadgetHeight(DTop) Print dtw+" , "+dth <end code> This code returns 2080 for the width of my desktop. I am using a screen resolution of 1280x1024. Maximum for my monitor is 1920. Why does GadgetWidth return such a high value? |
| ||
It depends on your screen configuration (second screen attached, virtual soft screen...) Use ClientWidth(Desktop()) and ClientHeight(Desktop()) to get only the primary screen parameter, that should solve it. |
| ||
http://www.chaos-interactive.de/index.php?show=12&lang=eng Crossplatform. |
| ||
Use ClientWidth(Desktop()) and ClientHeight(Desktop()) to get only the primary screen parameter Arrgghhh! When I was implementing the new WINDOW_CENTER flag in MaxGUI, I couldn't remember whether it was ClientWidth() or GadgetWidth() that returns the primary monitor resolution. Anyway, if it is the former, then I opted for the wrong one - oh well, I'll remember to fix it in the next release for those fortunate people with a decent dual monitor set-up ;-). |
| ||
OK. Thanks to all. I don't really have dual monitors but I do use UltraMon to mirror my monitor to my TV, which creates a number of odd quirks. |