Position window at the bottom. Self.bottom equivilent?

I have a long skinny horizontal window I’d like to show up just above the Windows Taskbar regardless of resolution size of the screen. I can have the window open to the same spot at the top using the following code but is there some kind of self.bottom for Xojo?

dim barheight as integer = self.top-self.Bounds.Top 
self.top = screen(0).AvailableTop+barheight

Suppose the taskbar is not at the bottom? What then?

Not an issue. I’m the only one using this app.

Rect (what a Window.Bounds is) has a Bottom property

Edit: Well that looks like it would resize the window. That won’t work. Guess you’ll just have to do some very simple math instead :man_shrugging:

I don’t see how you’d use that in a Window opening.

Set your top using some basic math. It looks like you know how to get Screen dimensions.

Just adding increments from the top doesn’t make it the same across different resolutions. I wish it was that easy.

Assuming you mean one window stretching multiple screens, you won’t be able stretch one Window across multiple screens relative to the Taskbar if the Taskbar is in different positions.

I suppose I could record the screen position at close to a preference file, then read it upon opening. Sort of set it once, and it remembers.

I don’t know if you’re describing the problem the right way.

If you need to position ONE window relative to the taskbar, that is super easy.
If you need to position ONE window relative to MULTIPLE taskbars across different resolutions, that is going to be a no-go for Xo-jo.

This. It’s just that if I did happen to have a co-worker use this, and their resolution was different, I’d want it to look the same. I can set it myself easily. Honestly, I was just curious if there was a sort of self.bottom. There doesn’t seem to be.

Get the screen, get it’s available width and height, subtract the window height, set the bounds.

I think I’ll just set it to a preference file upon closing. Give myself (and anyone else that would happen to use it) flexibility where the window is positioned next time it is opened.

I’m good. Thanks!