

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
37 messages in org.openoffice.fr.progRE: [prog] Question de débutant| From | Sent On | Attachments |
|---|---|---|
| Arnaud LAURENSON - Costes Gestion | Aug 24, 2005 7:07 am | |
| Christophe Liénard | Aug 24, 2005 9:18 am | |
| chris draux | Aug 24, 2005 11:09 am | |
| Jovial | Aug 24, 2005 1:06 pm | |
| Bernard Marcelly | Aug 24, 2005 11:31 pm | |
| Christophe Liénard | Aug 25, 2005 12:16 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 12:38 am | |
| Redlet | Aug 25, 2005 12:43 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 12:46 am | |
| Redlet | Aug 25, 2005 1:07 am | |
| Christophe Liénard | Aug 25, 2005 1:14 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 1:28 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 1:37 am | |
| Redlet | Aug 25, 2005 1:38 am | |
| Alex Thurgood | Aug 25, 2005 1:47 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 2:09 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 2:38 am | |
| Jovial | Aug 25, 2005 2:41 am | |
| Christophe Liénard | Aug 25, 2005 3:34 am | |
| Alex Thurgood | Aug 25, 2005 4:00 am | |
| Bernard Marcelly | Aug 25, 2005 4:20 am | |
| Arnaud LAURENSON - Costes Gestion | Aug 25, 2005 4:51 am | |
| Christophe Liénard | Aug 26, 2005 5:32 am | |
| Bernard Marcelly | Aug 26, 2005 7:29 am | |
| Christophe Liénard | Aug 26, 2005 7:43 am | |
| Bernard Marcelly | Aug 26, 2005 9:09 am | |
| Christophe Liénard | Aug 29, 2005 12:19 am | |
| Didier Laroche | Sep 22, 2005 11:15 am | |
| Christophe Liénard | Sep 23, 2005 12:41 am | |
| FRB | Sep 23, 2005 4:49 am | |
| Marie jo KOPP CASTINEL | Sep 23, 2005 6:03 am | |
| Alain Nowak | Sep 26, 2005 12:41 am | |
| Fred...@equipement.gouv.fr | Sep 26, 2005 4:53 am | |
| Christophe Liénard | Sep 26, 2005 5:29 am | |
| Alain Nowak | Sep 26, 2005 5:29 am | |
| Laurent Godard | Sep 26, 2005 5:54 am | |
| Fred...@equipement.gouv.fr | Sep 26, 2005 6:22 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: [prog] Question de débutant | Actions... |
|---|---|---|
| From: | Christophe Liénard (chri...@varilab.com) | |
| Date: | Sep 26, 2005 5:29:24 am | |
| List: | org.openoffice.fr.prog | |
Bonjour. Cette question a déjà fait l'objet d'un fil de discussion. La réponse finale était celle-ci (que l'auteur m'en excuse, je n'ai pas conservé son nom)
----------------------------------- Bonsoir, après avoir lu votre fil de discution, recherché des infos sur le net, fais des tests etc... Je vous livre le code ci dessous qui je l'espère vous donnera autant de satisfaction qu'a moi même ;-)
'document definition for Form à ouvrir Dim oFrmDef2 as object
Sub OpenForm( ) ' array of propertyvalues for 'OPEN' of form Dim stdOpenArgs(0) as new com.sun.star.beans.PropertyValue if isNull(oFrmDef2)then oFrmDef2 = thisComponent.parent.FormDocuments.getByName("ClientsSF") endif ' set up the property values used to open the available contacts form stdOpenArgs(0).name = "ActiveConnection" stdOpenArgs(0).value = thisComponent.Parent.Datasource.getConnection("","") thisComponent.parent.FormDocuments.LoadComponentFromURL( "ClientsSF", "_Blank", 0, stdOpenArgs() ) End Sub
Afin que la fenêtre ne se ferme pas, il suffit de déclarer la variable qui récupère l'objet par "thisComponent.parent.FormDocuments.getByName("ClientsSF")" en entête de module.
-------------------------------------
Le dernier point de la réponse te dit comment éviter que le formulaire nouvellement ouvert ne se ferme, c'est-à-dire mettre en en-tête de module la ligne Dim oFrmDef2 as object, si oFrmDef2 est le formulaire que tu veux ouvir.
oDocument.dispose permet de détruire ton objet oDocument et de libérer la mémoire qui lui était alouée.
Christophe
Bonjour encherchant sur internet comment faire pour qu'un bouton m'ouvre un formulaire j'ai trouvé cela :
Sub ouverture_formulaire
oDesktop = createUnoService ("com.sun.star.frame.Desktop") Dim loadArgs(0) as new com.sun.star.beans.PropertyValue loadArgs(0).Name = "showen" loadArgs(0).Value = true oDocument = oDesktop.LoadComponentFromURL(convertToURL("T:\gestion maintenance RN\Piece.odb"), "_blank", 0, loadArgs()) oForms = oDocument.FormDocuments oForm = oForms.getByName("Form gestion piece technique") rem oConnection =oDocument.Datasource.getConnection("","") Dim formArgs(0) as new com.sun.star.beans.PropertyValue rem formArgs(0).Name = "ActiveConnection" rem formArgs(0).Value = oConnection oFormDoc = oForms.LoadComponentFromURL("Form gestion piece technique", "_blank", 0, formArgs())
oDocument.dispose
End Sub
Donc j'utilise openoffice 2.0, j'ai une base de donnée "Piece.odb" qui contient un formulaire "Form accueil" avec des boutons pour lancer d'autres formulaire par exemple "Form gestion piece technique". J'ai donc écrit le code si dessus le formulaire se lance bien puis disparait de l'écran.
Quelqu'un peut il éclairer mes lanternes ???
me dire aussi ce que fait oDocument.dispose ?
Par avance merci.
BOUCHET Frédéric tel : 04-77-43-31-50 DDE42/SER/CIGT http://www.hyrondelle.net Etat des routes : 04-77-37-00-37 E-Mail : fred...@equipement.gouv.fr







