Announcement

Collapse
No announcement yet.

Prevent Dialogs to close when ESC key is pressed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • herrin
    replied

    repeat
    the script works very well, the problem is that you don't know what you're talking about



    an example is to make you understand how it works (then enter your code) ..........
    but if you want to come to your home to define the project





    Code:
    [ATTACH]n303882[/ATTACH]

    Leave a comment:


  • gutierrez107
    replied
    herrin your idea works very well with ESC button, but when we press ALT + F4 the dialog closes. So, I decided to use the function QueryAllowDialogClose. Anyway I really appreciate your help! Thank you very much!!!

    Leave a comment:


  • herrin
    replied
    Code:
    function QueryAllowDialogClose()
    return false;
    end


    the script works very well, the problem is that you don't know what you're talking about .... before venturing into messy scripts you have to study and not a little.........


    Click image for larger version

Name:	screen.PNG
Views:	146
Size:	91.5 KB
ID:	303877

    You can open more than one dialog box at a time, but you cannot use more than one dialog box at a time without closing one, AMS does not support it.
    You can also create a global variable for transferring data between dialog boxes or return a value after executing DialogEx.Close ()

    my last help


    Code:
    [ATTACH]n303878[/ATTACH]

    Leave a comment:


  • gutierrez107
    replied
    Hi herrin, thanks for reply! Unfortunately when add the global function QueryAllowDialogClose() your idea doesn't work :/

    Leave a comment:


  • herrin
    replied
    ...............................example


    Code:
    [ATTACH]n303874[/ATTACH]

    Leave a comment:


  • gutierrez107
    replied
    Hey guys I'm using the Global Function QueryAllowDialogClose() to prevent to close the dialog. However, how to navigate between 3 dialogs?

    Code:
    function QueryAllowDialogClose()
        return false;
    end

    Leave a comment:


  • gutierrez107
    replied
    herrin works very well 🙌

    Leave a comment:


  • herrin
    replied
    complete ......


    Code:
    [ATTACH]n303865[/ATTACH]

    Leave a comment:


  • herrin
    replied
    here a working example


    Code:
    [ATTACH]n303863[/ATTACH]

    Leave a comment:


  • gutierrez107
    replied
    Hey MrBryza thanks for reply!

    Take a look in this:

    Code:
    function QueryAllowDialogClose(strDialogName)
        result= Dialog.Message("Close Dialog", "Are you sure that you want to close the dialog?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
        --if they choose yes
        if result == IDYES then
            --allow the dialog to close
            return true; 
        else
            --cancel close
            return false;
        end
    end

    Leave a comment:


  • MrBryza
    replied
    Hi gutierrez107
    Try this, works for me.
    Dialog Disable ESC.apz

    Leave a comment:


  • Prevent Dialogs to close when ESC key is pressed

    Hello, I'm trying to prevent the dialog to close when the ESC key is pressed. Is it possible?

    Code:
    if e_Key == 27 then
        return false;
    end
Working...
X