Close Dialogform by Code (not Button with ModalResult=mrok)

Hello,

i check some Values of my Query (Dialog-Show-Event). In case that all Values exists, i want to Close the automaticly shown DialoForm by Code.
Else the user could change some Information at the Dialog ("DP_ex") and quit it after clicking the OK-Button (ModalResult mrok).

I tried a lot an red the whole Forum. :-)
'vb

Page = TfrxDialogPage(frxReport1.FindObject("DP_ex")
Page.Visible = False
Page.ModalResult = mrok

DP_ex.Visible = False
DP_ex.ModalResult = mrok

DP_Ex.Free
...

Doesnt work...

Thanks in advance

Comments

  • edited 8:44AM
    i solved my Problem.
    I Check the Infos at "frMainOnRunDialogs(byref Result)". If something missed i call DP_Ex.showmodal else i do nothing and the Dialog doesnt prompt.

    Thx

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.