OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to close the quicstarter

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ddorange
General User
General User


Joined: 29 Dec 2002
Posts: 13
Location: France

PostPosted: Fri Feb 10, 2006 2:09 pm    Post subject: How to close the quicstarter Reply with quote

Hello,
I would like under windows with macro
- to know if the quickstarter is launched,
- to close the quickstarter.

Is it possible ?

Thanks. Very Happy
Back to top
View user's profile Send private message Visit poster's website
ddorange
General User
General User


Joined: 29 Dec 2002
Posts: 13
Location: France

PostPosted: Sat Feb 11, 2006 11:26 am    Post subject: Reply with quote

Hello,

When my mouse is on the quickstarter icon, i get "Démarrage rapide de OpenOffice.org 2.0" with my french version of OOo.
Can somebody tell me the english sentence.
Thank you.
Back to top
View user's profile Send private message Visit poster's website
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Mon Feb 13, 2006 10:32 am    Post subject: Reply with quote

Closing quick starter will close your OOo (I think)
If you launch a macro in OOo, I don't see why the quick starter is a problem.
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
ddorange
General User
General User


Joined: 29 Dec 2002
Posts: 13
Location: France

PostPosted: Mon Feb 20, 2006 2:45 am    Post subject: Reply with quote

May be the solution using windows API. The macro editor have to be closed. Very Happy
Tested on WinXp.

Code:

Declare Function GetActiveWindow Lib "user32" () As Long
Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)

Sub Essai
   rem getting the active window's handle.
   hWnd = GetActiveWindow()
   rem closing all active windows
   On error resume Next
       myEnum = StarDesktop.Components.CreateEnumeration
       Do while myEnum.HasmoreElements
           oDoc = myEnum.NextElement
           If HasUnoInterfaces(oDoc, "com.sun.star.util.XCloseable") Then
           oDoc.close(true)
           Else
           oDoc.dispose()
           End If
       Loop
       On error goto 0
   rem closing the quickstarter
   ExitProcess(hWnd)
End Sub


Didier Dorange-Pattoret
http://www.dmaths.org
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group