Input with OK button only lazarus / 31-LCL ---------------------------------------------------------------------- lublinkermi · 2012-08-18 06:15 Is possible inputquery with OK button only? I need input data to program without create any form.I can't see any dialog returns variable without button "CANCEL" or other. ---------------------------------------------------------------------- exdatis · 2012-08-18 07:45 You can create a form that will be used as a dialog. Tbutton have property : ModalResult, just put button and set ModalResult = mrOk. Finally:   if my_dialog.ShowModal = mrOk then ... Regards. ---------------------------------------------------------------------- howardpc · 2012-08-18 10:07 InputBox() and InputQuery() both have Cancel buttons which are a fixed feature - not removable. The attached unit should do what you want. Add no_cancel_inputquery to your uses statement. Then place a call to NoCancelButtonInputQuery('Caption', 'Prompt') and it returns a string (which may be empty if no data is entered by the user). The dialog can be cancelled using [Esc] or the system [X] close icon.