Hello to all
I would like to create a basic programmatic Dialog, with a text or label control.
On this site I found this example:
REM ***** BASIC ******************************************************************************
Sub Example_Dialog
dim oFrmLesson, dlg, window, ctlmdl as object
oFrmLesson = createunoservice("com.sun.star.awt.UnoControlDialogModel")
with oFrmLesson
.name = "checkwriter"
.title = "Check Writer"
.positionx = 170
.positiony = 70
.width = 300
.height = 100
end with
dlg = CreateUnoService("com.sun.star.awt.UnoControlDialog")
dlg.setModel(oFrmLesson )
window = CreateUnoService("com.sun.star.awt.Toolkit")
dlg.createPeer(window, null)
ctlmdl = oFrmLesson.createinstance("com.sun.star.awt.UnoControlFixedTextModel")
with ctlmdl
.name = "HI"
.label = "HI"
.positionx = 10
.positiony = 10
.width = 20
.height = 20
end with
oFrmLesson.insertbyname("HI", ctlmdl)
' insert about 30 more controls...
' resize dialog as appropriate (varies)...
dlg.execute()
End Sub
It works.
But, when I hover my mouse on the windows taskbar and I’m over the document that contains this macro, it shows the dialog.
What can I do?
Greetings to all