Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

MSDIALOG()

DEFINE MSDIALOG oDlg TITLE cTitulo FROM nLinIni,nColIni TO nLinFim,nColFim PIXEL

Creates a dialog window.

MSDIALOG()AdvPL
01 · OVERVIEW

Overview

DEFINE MSDIALOG creates the visual container and ACTIVATE MSDIALOG starts interaction. TITLE sets the title and FROM/TO bounds in the chosen unit. Although the queue name uses parentheses, this page documents commands rather than an MSDIALOG() business-return function. The example opens a simple dialog without writes. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

DEFINE MSDIALOG oDlg TITLE cTitulo FROM nLinIni,nColIni TO nLinFim,nColFim PIXEL

Parameters

oDlg
ObjectRequired

Variable receiving the dialog.

coordenadas / SIZE
NumericRequired

Position and dimensions in the chosen unit.

Return value

UI command; no function return is documented for this syntax.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed537()
    Local oDlg
    // SmartClient UI: close the window to finish.
    DEFINE MSDIALOG oDlg TITLE "Example" FROM 0,0 TO 100,300 PIXEL
    ACTIVATE MSDIALOG oDlg CENTERED
Return Nil
Expected result

Opens a window; closing it does not automatically save data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Require a UI session and verify layout in the deployed client. Separate confirmation, cancellation and persistence; avoid modal dialogs in UI-less jobs.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MSDIALOG(). TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR

Was this content helpful?

👍 Like 0👎 Dislike 0

Sign in to rate this article.

0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha