Opening a Dialog With Basic

In the LibreOffice BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.

Enter the following code for a subroutine called Dialog1Show. In this example, the name of the dialog that you created is "Dialog1":


Sub Dialog1Show
    With GlobalScope.BasicLibraries
       If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
    End With
    oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1")
    oDialog1.Execute()
End Sub

"LoadDialog"-แƒ˜แƒก แƒ’แƒแƒ›แƒแƒงแƒ”แƒœแƒ”แƒ‘แƒ˜แƒก แƒ’แƒแƒ แƒ”แƒจแƒ” แƒ—แƒฅแƒ•แƒ”แƒœ แƒจแƒ”แƒ’แƒ˜แƒซแƒšแƒ˜แƒแƒ— แƒ’แƒแƒ›แƒแƒ˜แƒซแƒแƒฎแƒแƒ— แƒ™แƒแƒ“แƒ˜ แƒจแƒ”แƒ›แƒ“แƒ”แƒ’แƒœแƒแƒ˜แƒ แƒแƒ“:


Sub Dialog1Show
    DialogLibraries.LoadLibrary("Standard")
    oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )
    oDialog1.Execute()
End Sub

แƒแƒ› แƒ™แƒแƒ“แƒ˜แƒก แƒ’แƒแƒจแƒ•แƒ”แƒ‘แƒ˜แƒก แƒจแƒ”แƒ›แƒ“แƒ”แƒ’ แƒ’แƒแƒ˜แƒฎแƒกแƒœแƒ”แƒ‘แƒ "Dialog1". แƒ“แƒ˜แƒแƒšแƒแƒ’แƒ˜แƒก แƒ“แƒแƒกแƒแƒฎแƒฃแƒ แƒแƒ“ แƒกแƒแƒ—แƒแƒฃแƒ แƒ˜แƒก แƒ–แƒแƒšแƒจแƒ˜ แƒ“แƒแƒแƒญแƒ˜แƒ แƒ”แƒ— แƒ“แƒแƒฎแƒฃแƒ แƒ•แƒ˜แƒก แƒฆแƒ˜แƒšแƒแƒ™แƒก (x).

Please support us!