| View previous topic :: View next topic |
| Author |
Message |
Beginner Guest
|
Posted: Fri Jun 27, 2003 3:45 am Post subject: Problem with dialog in API |
|
|
Hello, I beginning user OpenOffice, but well know VBA.
I have problems with creation of dialogue (form).
I have created the form (MYdialog), but I do not know, how it to start from the module.
I looked the Help in ОО and other documentation. But not so well it has understood.
If it is possible, write to me the text of the program starting the form with a button. By pressing this button there should be any message.
Or send on Bsvsvb@rambler.ru
Thank you. |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jun 28, 2003 9:53 am Post subject: |
|
|
If your form is on a writerdocument do it like this:
| Code: |
Sub openFormOnAWriterDocument
Dim sUrl as String
Dim oDesktop as Object
oDesktop = createUnoService( "com.sun.star.frame.Desktop" )
sUrl = "file:///home/user/path/to/your/form.stw"
oDesktop = createUnoService( "com.sun.star.frame.Desktop" )
oDesktop.loadComponentFromUrl( sUrl , "_blank", 0, mNoArgs() )
End Sub
|
If your using a dialog:
| Code: |
Dim oMyDialog as Object
Sub openDialog
DialogLibraries.LoadLibrary( "Standard" )
oMyDialog = CreateUnoDialog( DialogLibraries.Standard.MyDialog )
oMyDialog.Execute()
End Sub
Sub closeDialog
oMyDialog.EndExecute()
End Sub
|
Of course you must adjust the path to your document or to the dialog in one of your libraries. |
|
| Back to top |
|
 |
uros Super User


Joined: 22 May 2003 Posts: 601 Location: Slovenia
|
Posted: Mon Jun 30, 2003 2:56 am Post subject: |
|
|
| Try with OpenOffice.org 1.0.2 SDK - DevelopersGuide, chapter 11 - Basic And Dialogs |
|
| Back to top |
|
 |
|