Problem description: So I've been looking around and found no answers,is there a command to enlarge the mainwindow without covering the taskbar? Similar to the [] on chrome/IE/firefox and such.
![]() Mar 12 2014, 3:42 pm
Best response
|
|
As in maximized? winset(src,"mainwindow","is-maximized=true")
|
Yeah, i've seen that it covers up the task bar though so it's not what im looking for...
|
I believe what you're asking for is something like this?
mob Of course, this is only for maximizing a window, but you can add more later. Example on use: _windowControls("maximize","default"); |
Well based on what you stated, you just want to get the size of the clients screen and adjust the width and the height of it.
This way it extends left and right but it won't go to where the task bar is. (Am I right?) |
Alright, so you want to get the clients screen resolution first. To do so, I use JavaScript.
In JavaScript, you have the variables "screen.width" and "screen.height" which will give you the clients screen. Make sure you create variables for the mob as such: mob/var/screen_width; First, you want to use this JavaScript code and send the message to BYOND Dream Seeker(using client/Topic() and such) Second, you set the mobs variables retrieved through client/Topic() and basically experiment with the cutoff( IE: Know how far high the task bar comes up) Lastly, you just use winset() to set the size of the newly cropped size. |
The setting is controlled by windows. If windows is set to allow windows to maximize over the taskbar then it will. Trying to "guess" how big the taskbar is won't work. There isn't a trick to get the clients resolution minus the taskbar if the windows can overlap, because they can change how big their task bar is, or where it is located.
|
To get the values via JavaScript and send them to DM, use something like this.
mob/proc/getResolution() Note: the getResolution() will set the variables for the client. Experiment with winset from there, and is-maximized can not be true, I believe, by doing this method. best of luck though. |
Pirion wrote:
The setting is controlled by windows. If windows is set to allow windows to maximize over the taskbar then it will. Trying to "guess" how big the taskbar is won't work. There isn't a trick to get the clients resolution minus the taskbar if the windows can overlap, because they can change how big their task bar is, or where it is located. my "getResolution()" proc just got the client's resolution. |
Ssj4justdale wrote:
my "getResolution()" proc just got the client's resolution. You, my friend, missed my point entirely. I can give three or four ways to get the resolution. Please post code that can tell me the following: # 1 - Which side of the screen is my task bar? # 2 - How large is it, if I allow windows to overlap it? |
Pirion wrote:
Ssj4justdale wrote: My apologies, I guess I may have misinterpreted your post. I thought you were saying that it's impossible to get the client's resolution as well as the task bar and substract it. If I find a way to get the resolution minus the taskbar, I'll let you know x.x haha |
The only way I know is to use size=9999x9999, and compare vs. the javascript resolution, but I doubt that'll work on a computer that is-maximized will not work on.
For sure let me know, I would love to know how to do it too. :) |
Ok ok, so I think i'll settle on using is-maximized to just keep things simple, not exactly what I wanted but hey, its close.
|
Pirion wrote:
The only way I know is to use size=9999x9999, and compare vs. the javascript resolution, but I doubt that'll work on a computer that is-maximized will not work on. Lovely, I devised a way for this to work :o no overlapping either! Let me create the snippet for you :D |
Well I sort of got stumped. I can calculate partially the positon of the taskbar.
|
Plemith wrote:
Ok ok, so I think i'll settle on using is-maximized to just keep things simple, not exactly what I wanted but hey, its close. mob I believe that is what you want? Give it a test go. Note: I created this with the window name being "default" so you must alter that or test it by creating a new window called default. |
Pirion wrote:
The only way I know is to use size=9999x9999, and compare vs. the javascript resolution, but I doubt that'll work on a computer that is-maximized will not work on. Finished it, and it works perfectly and doesn't get in the way of the task bar at all. mob is the code :) I wished I could get the task bar position, but maybe another time :o |