So I'm updating a macro that broke when IT updated my computer to Windows 10. I'm trying to add some additional functionality while I'm updating the macro anyway. I have a userform that I have set to modeless and am trying to move the userform to the right edge of the screen. I have done this in excel with the call:
me.Left = Application.Width - me.Width
However Solidworks informs me that:
So what is the equivalent Solidowrks version of the call.
Thanks in advance for any assistance you are able to provide.
SolidworksApi/macros
2016 SOLIDWORKS API Help - FrameLeft Property (ISldWorks)
Etc...
It's nowhere near as elegant as 's code but this is what I have reduced the code to.
I should clarify, I have realized that if I use an OVERSIZE = 8 and have (swRect.Right - OVERSIZE) * .75 I get really close to my value from when I manually position the form. My question is why? I can't figure out why I have a 3/4 ratio from form to pixels.
Alright I took your code and..... well it wasn't pretty.
What I've got now is this abbreviated piece of code:
The problem I have now is trying to understand the Form.Left value I see and how I'm supposed to evaluate to get to it.
swrect.right = 1928
form.width = 282
but when I manually align the form to the right edge of my left screen the value of form.left =1162
or when the form is at center form.left = 579
....I'm confused.
That gets a little more complicated.
This thread contains code and explanation for how to get all the info you want about SW document windows:
Thanks . This was what I needed to find. Now to figure out how to figure out dual screens....