summaryrefslogtreecommitdiff
path: root/helpcontent2/source
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-09-13 22:49:34 +0200
committerAndras Timar <atimar@suse.com>2012-09-13 22:49:34 +0200
commit1b660465a9dcf532f8eee6146fac9c3f2da9f2ca (patch)
tree4e0d6e783891283343097fcafdf1cc5dee0e6cb6 /helpcontent2/source
parent40989785363cf0238ed7228b7ca662fab75fc9ac (diff)
indented Basic source code + enabled syntax highlight for wiki
Change-Id: I4f0b0f434dc26a5b93c9e97ca48877e82c516682
Diffstat (limited to 'helpcontent2/source')
-rw-r--r--helpcontent2/source/text/sbasic/guide/sample_code.xhp134
-rw-r--r--helpcontent2/source/text/sbasic/guide/show_dialog.xhp24
2 files changed, 86 insertions, 72 deletions
diff --git a/helpcontent2/source/text/sbasic/guide/sample_code.xhp b/helpcontent2/source/text/sbasic/guide/sample_code.xhp
index dbb58a193..818ca388d 100644
--- a/helpcontent2/source/text/sbasic/guide/sample_code.xhp
+++ b/helpcontent2/source/text/sbasic/guide/sample_code.xhp
@@ -54,72 +54,82 @@
<paragraph role="paragraph" id="par_id3153031" xml-lang="en-US" l10n="CHG" oldref="2">The following examples are for a new <link href="text/sbasic/guide/create_dialog.xhp" name="dialog">dialog</link> called "Dialog1". Use the tools on the <emph>Toolbox</emph> bar in the dialog editor to create the dialog and add the following controls: a <emph>Check Box</emph> called "CheckBox1", a <emph>Label Field</emph> called "Label1", a <emph>Button</emph> called "CommandButton1", and a <emph>List Box</emph> called "ListBox1".</paragraph>
<paragraph role="warning" id="par_id3154141" xml-lang="en-US" l10n="U" oldref="3">Be consistent with uppercase and lowercase letter when you attach a control to an object variable.</paragraph>
<paragraph role="heading" id="hd_id3154909" xml-lang="en-US" level="3" l10n="U" oldref="4">Global Function for Loading Dialogs</paragraph>
-<paragraph role="code" id="par_id3153193" xml-lang="en-US" l10n="U" oldref="73">Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)</paragraph>
-<paragraph role="code" id="par_id3145787" xml-lang="en-US" l10n="U" oldref="74">Dim oLib as Object</paragraph>
-<paragraph role="code" id="par_id3148576" xml-lang="en-US" l10n="U" oldref="75">Dim oLibDialog as Object</paragraph>
-<paragraph role="code" id="par_id3153726" xml-lang="en-US" l10n="U" oldref="76">Dim oRuntimeDialog as Object</paragraph>
-<paragraph role="code" id="par_id3149261" xml-lang="en-US" l10n="U" oldref="77">If IsMissing(oLibContainer ) then</paragraph>
-<paragraph role="code" id="par_id3148646" xml-lang="en-US" l10n="U" oldref="78">oLibContainer = DialogLibraries</paragraph>
-<paragraph role="code" id="par_id3151115" xml-lang="en-US" l10n="U" oldref="79">End If</paragraph>
-<paragraph role="code" id="par_id3146986" xml-lang="en-US" l10n="U" oldref="80">oLibContainer.LoadLibrary(LibName)</paragraph>
-<paragraph role="code" id="par_id3145366" xml-lang="en-US" l10n="U" oldref="81">oLib = oLibContainer.GetByName(Libname)</paragraph>
-<paragraph role="code" id="par_id3145271" xml-lang="en-US" l10n="U" oldref="82">oLibDialog = oLib.GetByName(DialogName)</paragraph>
-<paragraph role="code" id="par_id3144764" xml-lang="en-US" l10n="U" oldref="83">oRuntimeDialog = CreateUnoDialog(oLibDialog)</paragraph>
-<paragraph role="code" id="par_id3153876" xml-lang="en-US" l10n="U" oldref="84">LoadDialog() = oRuntimeDialog</paragraph>
-<paragraph role="code" id="par_id3156286" xml-lang="en-US" l10n="U" oldref="85">End Function</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3153193" xml-lang="en-US" localize="false">Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)</paragraph>
+<paragraph role="bascode" id="par_id3145787" xml-lang="en-US" localize="false">Dim oLib as Object</paragraph>
+<paragraph role="bascode" id="par_id3148576" xml-lang="en-US" localize="false">Dim oLibDialog as Object</paragraph>
+<paragraph role="bascode" id="par_id3153726" xml-lang="en-US" localize="false">Dim oRuntimeDialog as Object</paragraph>
+<paragraph role="bascode" id="par_id3149261" xml-lang="en-US" localize="false"> If IsMissing(oLibContainer) Then</paragraph>
+<paragraph role="bascode" id="par_id3148646" xml-lang="en-US" localize="false"> oLibContainer = DialogLibraries</paragraph>
+<paragraph role="bascode" id="par_id3151115" xml-lang="en-US" localize="false"> End If</paragraph>
+<paragraph role="bascode" id="par_id3146986" xml-lang="en-US" localize="false"> oLibContainer.LoadLibrary(LibName)</paragraph>
+<paragraph role="bascode" id="par_id3145366" xml-lang="en-US" localize="false"> oLib = oLibContainer.GetByName(Libname)</paragraph>
+<paragraph role="bascode" id="par_id3145271" xml-lang="en-US" localize="false"> oLibDialog = oLib.GetByName(DialogName)</paragraph>
+<paragraph role="bascode" id="par_id3144764" xml-lang="en-US" localize="false"> oRuntimeDialog = CreateUnoDialog(oLibDialog)</paragraph>
+<paragraph role="bascode" id="par_id3153876" xml-lang="en-US" localize="false"> LoadDialog() = oRuntimeDialog</paragraph>
+<paragraph role="bascode" id="par_id3156286" xml-lang="en-US" localize="false">End Function</paragraph>
+</bascode>
<paragraph role="heading" id="hd_id3149412" xml-lang="en-US" level="3" l10n="U" oldref="18">Displaying a Dialog</paragraph>
-<paragraph role="code" id="par_id3145801" xml-lang="en-US" l10n="U" oldref="86">rem global definition of variables</paragraph>
-<paragraph role="code" id="par_id3150716" xml-lang="en-US" l10n="U" oldref="87">Dim oDialog1 AS Object</paragraph>
-<paragraph role="code" id="par_id3154510" xml-lang="en-US" l10n="U" oldref="88">Sub StartDialog1</paragraph>
-<paragraph role="code" id="par_id3146913" xml-lang="en-US" l10n="U" oldref="162">BasicLibraries.LoadLibrary("Tools")</paragraph>
-<paragraph role="code" id="par_id3150327" xml-lang="en-US" l10n="U" oldref="89">oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
-<paragraph role="code" id="par_id3155767" xml-lang="en-US" l10n="U" oldref="92">oDialog1.Execute()</paragraph>
-<paragraph role="code" id="par_id3149019" xml-lang="en-US" l10n="U" oldref="93">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3145801" xml-lang="en-US">REM global definition of variables</paragraph>
+<paragraph role="bascode" id="par_id3150716" xml-lang="en-US" localize="false">Dim oDialog1 AS Object</paragraph>
+<paragraph role="bascode" id="par_id3154510" xml-lang="en-US" localize="false">Sub StartDialog1</paragraph>
+<paragraph role="bascode" id="par_id3146913" xml-lang="en-US" localize="false"> BasicLibraries.LoadLibrary("Tools")</paragraph>
+<paragraph role="bascode" id="par_id3150327" xml-lang="en-US" localize="false"> oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
+<paragraph role="bascode" id="par_id3155767" xml-lang="en-US" localize="false"> oDialog1.Execute()</paragraph>
+<paragraph role="bascode" id="par_id3149019" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
<paragraph role="heading" id="hd_id3150042" xml-lang="en-US" level="3" l10n="U" oldref="27">Read or Edit Properties of Controls in the Program</paragraph>
-<paragraph role="code" id="par_id3159267" xml-lang="en-US" l10n="U" oldref="136">Sub Sample1</paragraph>
-<paragraph role="code" id="par_id3155335" xml-lang="en-US" l10n="U" oldref="163">BasicLibraries.LoadLibrary("Tools")</paragraph>
-<paragraph role="code" id="par_id3163808" xml-lang="en-US" l10n="U" oldref="137">oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
-<paragraph role="code" id="par_id3145232" xml-lang="en-US" l10n="U" oldref="138">REM get dialog model</paragraph>
-<paragraph role="code" id="par_id3146316" xml-lang="en-US" l10n="U" oldref="139">oDialog1Model = oDialog1.Model</paragraph>
-<paragraph role="code" id="par_id3154021" xml-lang="en-US" l10n="U" oldref="140">REM display text of Label1</paragraph>
-<paragraph role="code" id="par_id3150301" xml-lang="en-US" l10n="U" oldref="141">oLabel1 = oDialog1.GetControl("Label1")</paragraph>
-<paragraph role="code" id="par_id3152584" xml-lang="en-US" l10n="U" oldref="142">MsgBox oLabel1.Text</paragraph>
-<paragraph role="code" id="par_id3151277" xml-lang="en-US" l10n="U" oldref="143">REM set new text for control Label1</paragraph>
-<paragraph role="code" id="par_id3154119" xml-lang="en-US" l10n="U" oldref="144">oLabel1.Text = "New Files"</paragraph>
-<paragraph role="code" id="par_id3155115" xml-lang="en-US" l10n="U" oldref="145">REM display model properties for the control CheckBox1</paragraph>
-<paragraph role="code" id="par_id3166426" xml-lang="en-US" l10n="U" oldref="146">oCheckBox1Model = oDialog1Model.CheckBox1</paragraph>
-<paragraph role="code" id="par_id3153270" xml-lang="en-US" l10n="U" oldref="147">MsgBox oCheckBox1Model.Dbg_Properties</paragraph>
-<paragraph role="code" id="par_id3149817" xml-lang="en-US" l10n="U" oldref="148">REM set new state for CheckBox1 for model of control</paragraph>
-<paragraph role="code" id="par_id3145134" xml-lang="en-US" l10n="U" oldref="149">oCheckBox1Model.State = 1</paragraph>
-<paragraph role="code" id="par_id3159102" xml-lang="en-US" l10n="U" oldref="150">REM display model properties for control CommandButton1</paragraph>
-<paragraph role="code" id="par_id3152777" xml-lang="en-US" l10n="U" oldref="151">oCMD1Model = oDialog1Model.CommandButton1</paragraph>
-<paragraph role="code" id="par_id3149209" xml-lang="en-US" l10n="U" oldref="152">MsgBox oCMD1Model.Dbg_Properties</paragraph>
-<paragraph role="code" id="par_id3150368" xml-lang="en-US" l10n="U" oldref="153">REM display properties of control CommandButton1</paragraph>
-<paragraph role="code" id="par_id3150883" xml-lang="en-US" l10n="U" oldref="154">oCMD1 = oDialog1.GetControl("CommandButton1")</paragraph>
-<paragraph role="code" id="par_id3155380" xml-lang="en-US" l10n="U" oldref="155">MsgBox oCMD1.Dbg_Properties</paragraph>
-<paragraph role="code" id="par_id3150201" xml-lang="en-US" l10n="U" oldref="156">REM execute dialog</paragraph>
-<paragraph role="code" id="par_id3154485" xml-lang="en-US" l10n="U" oldref="157">oDialog1.Execute()</paragraph>
-<paragraph role="code" id="par_id3146115" xml-lang="en-US" l10n="U" oldref="158">End Sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3159267" xml-lang="en-US" localize="false">Sub Sample1</paragraph>
+<paragraph role="bascode" id="par_id3155335" xml-lang="en-US" localize="false"> BasicLibraries.LoadLibrary("Tools")</paragraph>
+<paragraph role="bascode" id="par_id3163808" xml-lang="en-US" localize="false"> oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
+<paragraph role="bascode" id="par_id3145232" xml-lang="en-US"> REM get dialog model</paragraph>
+<paragraph role="bascode" id="par_id3146316" xml-lang="en-US" localize="false"> oDialog1Model = oDialog1.Model</paragraph>
+<paragraph role="bascode" id="par_id3154021" xml-lang="en-US"> REM display text of Label1</paragraph>
+<paragraph role="bascode" id="par_id3150301" xml-lang="en-US" localize="false"> oLabel1 = oDialog1.GetControl("Label1")</paragraph>
+<paragraph role="bascode" id="par_id3152584" xml-lang="en-US" localize="false"> MsgBox oLabel1.Text</paragraph>
+<paragraph role="bascode" id="par_id3151277" xml-lang="en-US"> REM set new text for control Label1</paragraph>
+<paragraph role="bascode" id="par_id3154119" xml-lang="en-US"> oLabel1.Text = "New Files"</paragraph>
+<paragraph role="bascode" id="par_id3155115" xml-lang="en-US"> REM display model properties for the control CheckBox1</paragraph>
+<paragraph role="bascode" id="par_id3166426" xml-lang="en-US" localize="false"> oCheckBox1Model = oDialog1Model.CheckBox1</paragraph>
+<paragraph role="bascode" id="par_id3153270" xml-lang="en-US" localize="false"> MsgBox oCheckBox1Model.Dbg_Properties</paragraph>
+<paragraph role="bascode" id="par_id3149817" xml-lang="en-US"> REM set new state for CheckBox1 for model of control</paragraph>
+<paragraph role="bascode" id="par_id3145134" xml-lang="en-US" localize="false"> oCheckBox1Model.State = 1</paragraph>
+<paragraph role="bascode" id="par_id3159102" xml-lang="en-US"> REM display model properties for control CommandButton1</paragraph>
+<paragraph role="bascode" id="par_id3152777" xml-lang="en-US" localize="false"> oCMD1Model = oDialog1Model.CommandButton1</paragraph>
+<paragraph role="bascode" id="par_id3149209" xml-lang="en-US" localize="false"> MsgBox oCMD1Model.Dbg_Properties</paragraph>
+<paragraph role="bascode" id="par_id3150368" xml-lang="en-US"> REM display properties of control CommandButton1</paragraph>
+<paragraph role="bascode" id="par_id3150883" xml-lang="en-US" localize="false"> oCMD1 = oDialog1.GetControl("CommandButton1")</paragraph>
+<paragraph role="bascode" id="par_id3155380" xml-lang="en-US" localize="false"> MsgBox oCMD1.Dbg_Properties</paragraph>
+<paragraph role="bascode" id="par_id3150201" xml-lang="en-US"> REM execute dialog</paragraph>
+<paragraph role="bascode" id="par_id3154485" xml-lang="en-US" localize="false"> oDialog1.Execute()</paragraph>
+<paragraph role="bascode" id="par_id3146115" xml-lang="en-US">End Sub</paragraph>
+</bascode>
<paragraph role="heading" id="hd_id3145387" xml-lang="en-US" level="3" l10n="U" oldref="55">Add an Entry to a ListBox</paragraph>
-<paragraph role="code" id="par_id3155088" xml-lang="en-US" l10n="U" oldref="122">Sub AddEntry</paragraph>
-<paragraph role="code" id="par_id3154528" xml-lang="en-US" l10n="U" oldref="164">BasicLibraries.LoadLibrary("Tools")</paragraph>
-<paragraph role="code" id="par_id3159222" xml-lang="en-US" l10n="U" oldref="159">oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
-<paragraph role="code" id="par_id3148700" xml-lang="en-US" l10n="U" oldref="123">REM adds a new entry to the ListBox</paragraph>
-<paragraph role="code" id="par_id3159173" xml-lang="en-US" l10n="U" oldref="124">oDialog1Model = oDialog1.Model</paragraph>
-<paragraph role="code" id="par_id3153305" xml-lang="en-US" l10n="U" oldref="125">oListBox = oDialog1.GetControl("ListBox1")</paragraph>
-<paragraph role="code" id="par_id3153914" xml-lang="en-US" l10n="U" oldref="126">dim iCount as integer</paragraph>
-<paragraph role="code" id="par_id3151243" xml-lang="en-US" l10n="U" oldref="127">iCount = oListbox.ItemCount</paragraph>
-<paragraph role="code" id="par_id3144504" xml-lang="en-US" l10n="U" oldref="128">oListbox.additem("New Item" &amp; iCount,0)</paragraph>
-<paragraph role="code" id="par_id3149328" xml-lang="en-US" l10n="U" oldref="129">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3155088" xml-lang="en-US" localize="false">Sub AddEntry</paragraph>
+<paragraph role="bascode" id="par_id3154528" xml-lang="en-US" localize="false"> BasicLibraries.LoadLibrary("Tools")</paragraph>
+<paragraph role="bascode" id="par_id3159222" xml-lang="en-US" localize="false"> oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
+<paragraph role="bascode" id="par_id3148700" xml-lang="en-US"> REM adds a new entry to the ListBox</paragraph>
+<paragraph role="bascode" id="par_id3159173" xml-lang="en-US" localize="false"> oDialog1Model = oDialog1.Model</paragraph>
+<paragraph role="bascode" id="par_id3153305" xml-lang="en-US" localize="false"> oListBox = oDialog1.GetControl("ListBox1")</paragraph>
+<paragraph role="bascode" id="par_id3153914" xml-lang="en-US" localize="false"> Dim iCount as integer</paragraph>
+<paragraph role="bascode" id="par_id3151243" xml-lang="en-US" localize="false"> iCount = oListbox.ItemCount</paragraph>
+<paragraph role="bascode" id="par_id3144504" xml-lang="en-US"> oListbox.additem("New Item" &amp; iCount,0)</paragraph>
+<paragraph role="bascode" id="par_id3149328" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
<paragraph role="heading" id="hd_id3147071" xml-lang="en-US" level="3" l10n="U" oldref="64">Remove an Entry from a ListBox</paragraph>
-<paragraph role="code" id="par_id3159095" xml-lang="en-US" l10n="U" oldref="130">Sub RemoveEntry</paragraph>
-<paragraph role="code" id="par_id3154958" xml-lang="en-US" l10n="U" oldref="165">BasicLibraries.LoadLibrary("Tools")</paragraph>
-<paragraph role="code" id="par_id3149443" xml-lang="en-US" l10n="U" oldref="160">oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
-<paragraph role="code" id="par_id3153247" xml-lang="en-US" l10n="U" oldref="131">REM remove the first entry from the ListBox</paragraph>
-<paragraph role="code" id="par_id3151302" xml-lang="en-US" l10n="U" oldref="132">oDialog1Model = oDialog1.Model</paragraph>
-<paragraph role="code" id="par_id3153976" xml-lang="en-US" l10n="U" oldref="133">oListBox = oDialog1.GetControl("ListBox1")</paragraph>
-<paragraph role="code" id="par_id3155383" xml-lang="en-US" l10n="U" oldref="134">oListbox.removeitems(0,1)</paragraph>
-<paragraph role="code" id="par_id3150892" xml-lang="en-US" l10n="U" oldref="135">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3159095" xml-lang="en-US" localize="false">Sub RemoveEntry</paragraph>
+<paragraph role="bascode" id="par_id3154958" xml-lang="en-US" localize="false"> BasicLibraries.LoadLibrary("Tools")</paragraph>
+<paragraph role="bascode" id="par_id3149443" xml-lang="en-US" localize="false"> oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
+<paragraph role="bascode" id="par_id3153247" xml-lang="en-US"> REM remove the first entry from the ListBox</paragraph>
+<paragraph role="bascode" id="par_id3151302" xml-lang="en-US" localize="false"> oDialog1Model = oDialog1.Model</paragraph>
+<paragraph role="bascode" id="par_id3153976" xml-lang="en-US" localize="false"> oListBox = oDialog1.GetControl("ListBox1")</paragraph>
+<paragraph role="bascode" id="par_id3155383" xml-lang="en-US" localize="false"> oListbox.removeitems(0,1)</paragraph>
+<paragraph role="bascode" id="par_id3150892" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
<section id="relatedtopics">
<embed href="text/sbasic/guide/control_properties.xhp#control_properties"/>
<embed href="text/sbasic/guide/create_dialog.xhp#create_dialog"/>
diff --git a/helpcontent2/source/text/sbasic/guide/show_dialog.xhp b/helpcontent2/source/text/sbasic/guide/show_dialog.xhp
index 2439bcaf8..c412d2ac4 100644
--- a/helpcontent2/source/text/sbasic/guide/show_dialog.xhp
+++ b/helpcontent2/source/text/sbasic/guide/show_dialog.xhp
@@ -47,17 +47,21 @@
</variable></paragraph>
<paragraph role="paragraph" id="par_id3145171" xml-lang="en-US" l10n="U" oldref="2">In the <item type="productname">%PRODUCTNAME</item> 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.</paragraph>
<paragraph role="paragraph" id="par_id3153968" xml-lang="en-US" l10n="U" oldref="6">Enter the following code for a subroutine called <emph>Dialog1Show</emph>. In this example, the name of the dialog that you created is "Dialog1":</paragraph>
-<paragraph role="code" id="par_id3156443" xml-lang="en-US" l10n="U" oldref="7">Sub Dialog1Show</paragraph>
-<paragraph role="code" id="par_id3148575" xml-lang="en-US" l10n="U" oldref="24">BasicLibraries.LoadLibrary("Tools")</paragraph>
-<paragraph role="code" id="par_id3152463" xml-lang="en-US" l10n="U" oldref="8">oDialog1 = <link href="text/sbasic/guide/sample_code.xhp" name="LoadDialog">LoadDialog</link>("Standard", "Dialog1")</paragraph>
-<paragraph role="code" id="par_id3148646" xml-lang="en-US" l10n="U" oldref="14">oDialog1.Execute()</paragraph>
-<paragraph role="code" id="par_id3147349" xml-lang="en-US" l10n="U" oldref="15">End Sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3156443" xml-lang="en-US" localize="false">Sub Dialog1Show</paragraph>
+<paragraph role="bascode" id="par_id3148575" xml-lang="en-US" localize="false"> BasicLibraries.LoadLibrary("Tools")</paragraph>
+<paragraph role="bascode" id="par_id3152463" xml-lang="en-US" localize="false"> oDialog1 = LoadDialog("Standard", "Dialog1")</paragraph>
+<paragraph role="bascode" id="par_id3148646" xml-lang="en-US" localize="false"> oDialog1.Execute()</paragraph>
+<paragraph role="bascode" id="par_id3147349" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
<paragraph role="paragraph" id="par_id3152596" xml-lang="en-US" l10n="U" oldref="18">Without using "LoadDialog" you can call the code as follows:</paragraph>
-<paragraph role="code" id="par_id3163710" xml-lang="en-US" l10n="U" oldref="19">Sub Dialog1Show</paragraph>
-<paragraph role="code" id="par_id3146985" xml-lang="en-US" l10n="U" oldref="20">DialogLibraries.LoadLibrary( "Standard" )</paragraph>
-<paragraph role="code" id="par_id3155418" xml-lang="en-US" l10n="U" oldref="21">oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )</paragraph>
-<paragraph role="code" id="par_id3154944" xml-lang="en-US" l10n="U" oldref="22">oDialog1.Execute()</paragraph>
-<paragraph role="code" id="par_id3145800" xml-lang="en-US" l10n="U" oldref="23">End Sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3163710" xml-lang="en-US" localize="false">Sub Dialog1Show</paragraph>
+<paragraph role="bascode" id="par_id3146985" xml-lang="en-US" localize="false"> DialogLibraries.LoadLibrary("Standard")</paragraph>
+<paragraph role="bascode" id="par_id3155418" xml-lang="en-US" localize="false"> oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )</paragraph>
+<paragraph role="bascode" id="par_id3154944" xml-lang="en-US" localize="false"> oDialog1.Execute()</paragraph>
+<paragraph role="bascode" id="par_id3145800" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
<paragraph role="paragraph" id="par_id3153157" xml-lang="en-US" l10n="U" oldref="16">When you execute this code, "Dialog1" opens. To close the dialog, click the close button (x) on its title bar.</paragraph>
<section id="relatedtopics">
<embed href="text/sbasic/guide/control_properties.xhp#control_properties"/>