How to load forms to full screen

Creating and using forms
Post Reply
jmckay
Posts: 8
Joined: Thu Jun 04, 2009 5:00 pm

How to load forms to full screen

Post by jmckay »

Hi guys,

I have a MySQL database running through base.

I have a main form with buttons that use the macro below to load other forms.

Code: Select all

sub load_support 
dim oCurrentController 
'Variables for document what will be opened 
dim sNewfileFormName ' This is the name how it is in the database 
dim oNewformtoSee ' Object for the new form what will beopend 
sNewfileFormName="customersupport" 'is a writer form it must be in this database 

'ThisDatabaseDocument 'ThisDatabaseDocument is a new constant in OOO3.0 
oCurrentController=ThisDatabaseDocument.CurrentController 

if ThisDatabaseDocument.FormDocuments.hasbyname(sNewfileFormName) then 
' the form exist and can maybe opend 
oNewformtoSee=oCurrentController.loadComponent( com.sun.star.sdb.application.DatabaseObject.FORM,sNewfileFormName,FALSE) ' or TRUE for editing the documentwait 10 
else 
msgbox "The does not exist and cannot be opend" 
end 
end if 
End Sub 
When the form loads it is nearly the full size of the screen, but not the maximum size... is there an easy way to get it to load all forms as maximum size?

Each other form has a button to return to the main menu which uses the same macro as above to load the main menu, is their a way to get it to close the form that is currently loaded before returning to the main form?

Thanks in advance!

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. (TheGurkha, Moderator)
OOo 3.1.X on OTHER + XP, Server 2003, OS10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Forms - help!!!!

Post by Villeroy »

Open the form in edit mode.
Resize the window.
Store the form.
Store the database.
The individual positions and sizes of form documents are stored in the db-container.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jmckay
Posts: 8
Joined: Thu Jun 04, 2009 5:00 pm

Re: How to load forms to full screen

Post by jmckay »

I've done this with no success... managed to get a macro which worked, will post details here later.

Does anyone know of a macro that will close the form on display when the user selects a button labled "exit"?

Thanks
OOo 3.1.X on OTHER + XP, Server 2003, OS10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to load forms to full screen

Post by Villeroy »

Button's action = Open URL or document.
URL= .uno:CloseDoc

A simlple text-hyperlink can do as well.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
JensOnOOo
Posts: 6
Joined: Sun Jun 21, 2009 5:58 pm
Location: India

Re: How to load forms to full screen

Post by JensOnOOo »

Hi,

I am still a newbee....

I saw the code and my Document is closing.... like it is said...

URL= .uno:CloseDoc

My Questions are:

How to open an other formular, i.e .uno:OpenDoc "Adresses"?

How to get FullSize Window without Toolbares, i.e .uno:FullSizeDoc ?

Where do I find an overview of possible commands like .uno:CLoseDoc? (Link?)

Jens
OOo 3.1.X on MS Windows Vista
Arineckaig
Volunteer
Posts: 828
Joined: Fri Nov 30, 2007 10:58 am
Location: Scotland

Re: How to load forms to full screen

Post by Arineckaig »

How to get FullSize Window without Toolbares, i.e .uno:FullSizeDoc ?
Try .uno:FullScreen

or Ctrl+Shft+J
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
AOOo 4.1.5 & LO 6 on MS Windows 10 MySQL and HSQLDB
JensOnOOo
Posts: 6
Joined: Sun Jun 21, 2009 5:58 pm
Location: India

Re: How to load forms to full screen

Post by JensOnOOo »

Hi,

thanks for this advice.

I will try in the next days... guess it is one more step...

Which books help really to programm simple makros, like forwarding a value, or finding an datasentence based on this value, when opening a new form?

I need samples...

Thanks
Jens
OOo 3.1.X on MS Windows Vista
jolyon
Posts: 1
Joined: Tue Aug 03, 2010 11:44 am

Re: How to load forms to full screen

Post by jolyon »

Where do I find an overview of possible commands like .uno:CLoseDoc? (Link?)
Jens
You can find it here:
http://docs.sun.com/app/docs/doc/817-7496/fgvsb?a=view
OOo 3.2.1
Linux Ubuntu 10.04
Arineckaig
Volunteer
Posts: 828
Joined: Fri Nov 30, 2007 10:58 am
Location: Scotland

Re: How to load forms to full screen

Post by Arineckaig »

JensOnOOo said:
Which books help really to programm simple makros, like forwarding a value, or finding an datasentence based on this value, when opening a new form?
You might also try:
http://wiki.services.openoffice.org/wik ... ASIC_Guide
or at: http://www.baseprogramming.com/resources.html
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
AOOo 4.1.5 & LO 6 on MS Windows 10 MySQL and HSQLDB
Post Reply