i defined this global variable to be used in my Base forms:
Code: Select all
Global FrameSize as new com.sun.star.awt.Size
please help.
thx in advance
Code: Select all
Global FrameSize as new com.sun.star.awt.Size
Code: Select all
Global FrameSize
Code: Select all
REM ***** BASIC *****
Global FrameSize
Sub QueryFrames
Dim vFrames As Variant 'All of the frames
Dim vFrame As Variant 'A single frame
Dim i As Integer 'Index to enumerate the frames
Dim s As String 'Contains the string to print
REM Call the queryFrames() method on the XFrames interface.
REM This takes one argument, a FrameSearchFlag.
REM This searches the children of the desktop.
vFrames = StarDesktop.getFrames().queryFrames(com.sun.star.frame.FrameSearchFlag.CHILDREN)
For i = LBound(vFrames) To UBound(vFrames) ' The return value is an array.
s = s & vFrames(i).Title & CHR$(10) ' Append the title and a new line.
if i = 0 then
FrameSize = vFrames(i).getComponentWindow().getSize()
endif
Next
MsgBox s, 0, "Frame Titles" ' Display the titles.
End Sub