<html><head><title>Show a Dialog Using Program Code</title><meta name="filename" content="text/sbasic/guide/show_dialog"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
p.P1{
}
p.P2{
}
span.T1{
font-weight:bold;}
</style></head><body>
<p class="P1"/>
<p class="Head1"><help:key-word value="show a dialog using program code" tag="kw68538_1" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="show_dialog" xmlns:help="http://openoffice.org/2000/help"><help:link Id="68538">Show a Dialog Using Program Code</help:link></help:to-be-embedded></p>
<p class="Paragraph">After creating a dialog, you want to use it from inside your program code. You are still in the dialog editor, so you first go back into the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic IDE.</p>
<p class="Head2"><help:key-word value="toggle between modules and dialogs" tag="kw68538_2" xmlns:help="http://openoffice.org/2000/help"/>Toggle between Modules and Dialogs</p>
<p class="Paragraph">There are two tabs in the lower part of the dialog editor, which are used to toggle between dialog and module. If you use multiple modules or dialogs, you see more tabs to jump to a dialog or module by name. Click on <span class="T1">Module1</span>, now you are back in the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic IDE.</p>
<p class="Head2">Show a Dialog from within the Program Code</p>
<p class="Paragraph">Create a sub with the name <span class="T1">Dialog1Show</span>.</p>
<p class="Paragraph">If you start the sub <span class="T1">Dialog1Show</span>, first your dialog appears. Close this dialog with the closer in the title bar, and the program continues execution.</p>