The whole window frame inner border

Creating a macro - Writing a Script - Using the API

The whole window frame inner border

Postby arfgh » Thu Jul 02, 2020 10:59 am

in forms, the whole window border has a inner tiny frame that is visible, like a big square into the window borders.
I want to access it with the api in order to make that frame border size = 0 for cosmetic purposes.
I have been meesing with the activewindow frame object without lucky at the moment...

And other than that, i am also trying to see if with the api is possible to hide the window borders... i mean no win32 api way, just native way. Is it possible ?

some help would be apreciated.
Last edited by arfgh on Thu Jul 02, 2020 11:48 am, edited 1 time in total.
OpenOffice last version | Mageia Linux x64 | Windows 8.1 Enterprise x64 | Windows XP Pro x64 SP2 | Java 1.8.0_231
arfgh
 
Posts: 517
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Postby RoryOF » Thu Jul 02, 2020 11:03 am

Please list the code you have used, to give us a head start. Surround the code with code brackets - use Full editor, select your code and press the Code button.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31239
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: The whole window frame inner border

Postby arfgh » Thu Jul 02, 2020 11:53 am

well, i am here but i obtain no childs. 'Frame' is the active window. But i am not sure if i am walking in the good direction to reach the objetive...

Code: Select all   Expand viewCollapse view
sub WindowFrame(frame as object)
   dim oAC as object, role as object, i as byte
   oAC = frame.ComponentWindow.AccessibleContext.AccessibleParent.AccessibleContext.AccessibleParent.AccessibleContext 'INTERNAL_FRAME
   for i = 0 to oAC.accessibleChildCount - 1                               
      role = SearchForChild(oAC, "", "", com.sun.star.accessibility.AccessibleRole.INTERNAL_FRAME)
      if not IsNull(role) then
         beep
         exit for                             
      end if                                                           
   next                     
end sub
function SearchForChild(oAC as Object, sName as String, sDescription as String, lRole as Long) as Object
   dim i as byte, oACChild as object, bfound as boolean
    for i = 0 to oAC.AccessibleChildCount - 1
      oACChild = oAC.getAccessibleChild(i)
         if not HasUnoInterfaces(oACChild, "com.sun.star.accessibility.XAccessibleContext") then
           if HasUnoInterfaces(oACChild, "com.sun.star.accessibility.XAccessible") then
                oACChild = oACChild.AccessibleContext
             else
                exit function 'unexpected situation, maybe caused by some intermediate state
             end if
        end if
         bfound = true
         if sName <> "" then bfound = bFound and (oACChild.AccessibleName = sName)
         if sDescription <> "" then bfound = bFound and (oACChild.AccessibleDescription = sDescription)
         if lRole > -1 then bfound = bfound and (oACChild.AccessibleRole = lRole)               
      if bfound then
           SearchForChild = oACChild
           exit function
        end if
   next
end function
OpenOffice last version | Mageia Linux x64 | Windows 8.1 Enterprise x64 | Windows XP Pro x64 SP2 | Java 1.8.0_231
arfgh
 
Posts: 517
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Postby JeJe » Thu Jul 02, 2020 12:28 pm

My guess is if you find anything it'll be read only and you're wasting your time.
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 1089
Joined: Wed Mar 09, 2016 2:40 pm

Re: The whole window frame inner border

Postby arfgh » Thu Jul 02, 2020 12:34 pm

JeJe, not necessarily. Before to find a better way to disable vertical scroll bar, i was able to do it altering the accessibleContext...
OpenOffice last version | Mageia Linux x64 | Windows 8.1 Enterprise x64 | Windows XP Pro x64 SP2 | Java 1.8.0_231
arfgh
 
Posts: 517
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Postby JeJe » Thu Jul 02, 2020 12:50 pm

Great... two different guesses... with a measurable outcome. I think you should count up the hours you spend on this one and post again when you succeed / give up... (with the tally...)
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 1089
Joined: Wed Mar 09, 2016 2:40 pm

Re: The whole window frame inner border

Postby arfgh » Thu Jul 02, 2020 11:26 pm

here i show a capture of the inner frame i am saying. This capture show the window once its caption and window border is disabled, but that little inner frame around is what i want to alter.
2020-07-02-232325.jpg


https://i.postimg.cc/kXCkXn6C/2020-07-02-232325.jpg
Last edited by MrProgrammer on Fri Jul 03, 2020 12:03 am, edited 1 time in total.
Reason: Uploaded image, since file on posting.cc will disappear eventually
OpenOffice last version | Mageia Linux x64 | Windows 8.1 Enterprise x64 | Windows XP Pro x64 SP2 | Java 1.8.0_231
arfgh
 
Posts: 517
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Postby arfgh » Tue Aug 04, 2020 2:36 pm

at the moment i havent found no way to alter that frame, but maybe somebody know a way to do it using the win32 api directly ?
reason to achieve this, just want to keep content but not that 3D border, with the intention to hide a layer color in order to make it transparent. So the problem is just that 3D border that is surrounding the whole document content....
OpenOffice last version | Mageia Linux x64 | Windows 8.1 Enterprise x64 | Windows XP Pro x64 SP2 | Java 1.8.0_231
arfgh
 
Posts: 517
Joined: Tue Mar 05, 2013 6:44 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests